SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jun 2001
    Location
    Bedford, MA, USA
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ArgListCall and \"out\" parameters

    Hi All.

    For data driven testing I've happily used ArgListCall to execute functions by name reference. However it does not seem to handle output parameters! The code below gets this error at run time.

    *** Error: Variable expected on parameter sOut to function MyFunc
    Occurred in main at arglist.t(3)

    code:
    ___________________________________________
    main()
    {
    STRING sOutput = "";
    ArgListCall("MyFunc", {"ABC", sOutput});
    print(sOutput);
    }

    MyFunc(STRING sIn, out STRING sOut)
    sOut = sIn + "DEF";
    ___________________________________________

    Am I doing something wrong? (I'm using SilkTest 5.5).

    Thanks,
    Jim

    ------------------

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ArgListCall and \"out\" parameters

    Silk is complaining about the use of "out" in MyFunc.

    You could request clarification from Segue support on this, or just restructure the code a bit:

    John


    ------------------

  3. #3
    Member
    Join Date
    Jun 2001
    Location
    Bedford, MA, USA
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ArgListCall and \"out\" parameters

    John,
    Thank You for your reply to my problem. I will attempt to get an answer from Segue Support on this.
    Unfortunately I cannot restructure the many functions that I need to call via ArgListCall. They are part of our shared library, so I don't "own" them. Even if I could, these functions need to be able to return *more* than a single return value - thus the use of the "out" parameter. I think it's a real shortcoming of ArgListCall that it does not support out parameters.
    - Jim

    ------------------

 

 

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 07:23 AM.

Copyright BetaSoft Inc.