SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cannot use [hHost]

    I want to use the SYS_ functions on the host machine instead of on the target machine, and following what it said in the user's guide, I used the [hHost] form of calling the machine handle operator (P366 in the Users Guide, chapter 21).
    This is not working for me unfortunately; if I try to use SetMachine(hHost), then it complains at runtime that it was expecting a machine handle; if I use [hHost] in each function call, then it fails at compile time:
    for any function where I use [hHost] at the start of the line, e.g.
    [hHost]SYS_SetDrive("T")
    this is acceptable. But if I have to use [hHost] at a different point in the line, e.g.
    string pathnow = [hHost]SYS_GetEnv("path")
    then it takes what I am doing to be casting to a different datatype the results of the function call, and complains (at compile time) that hHost is not a valid datatype.

    Has anybody else experienced this kind of problem, or found a workaround?

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use [hHost]

    I haven't had this problem but, I think you may make it work by separating the STRING declaration and the Get statment.
    Try this instead:

    STRING pathnow
    pathnow = [hHost]SYS_GetEnv("path")

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use [hHost]

    No, I'm afraid that the compiler still objects when I try it with that formulation.

  4. #4
    Member
    Join Date
    Dec 1999
    Location
    Portland, OR, USA
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use [hHost]

    a) Usage of the machinehandle operator is incorrectly documented, the Users Guide and the 4test language reference are in direct conflict. They describe bracket form [] versus arrow form ->.

    Ref: Users Guide bottom of page 366 (and top of page 367) says the arrow form must be at the beginning of the line but the bracket form can be anywhere.

    but the 4test language reference top of page 766 (second description from the top) says the bracket form must be at the beginning of the line (directly contradictory).

    b) Also, the Silk compiler frequently misinterprets the bracket form as a type cast operator, making it effectively useless.

    I have been trying to make use of machine handles, but I have been getting some very strange behaviors, and the conflicting documentation makes it impossible for me to achieve a resolution. I had spent quite a lot of time coding (probably incorrectly) using machinehandles (arrow style) until I noticed the conflict, and decided to stop using them until this issue is resolved. I am presently trying to implement alternative solutions.
    Quality Control Analyst at Syntel Inc
    Project Test Lead for client Daimler Trucks - North America.
    Interested in testing dot net web services and SOA systems.
    Charles F. Radley
    Oregon, USA.

  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot use [hHost]

    Thanks for the advice. If I come up with anything useful as a workaround I will post it here.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:54 AM.

Copyright BetaSoft Inc.