SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jul 2001
    Location
    Beaverton, Oregon, USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need to feed args to main()

    Hello,

    I wonder there is a way to feed args in main().
    My sample test code is,

    In the Test-Arg.t script, I created as follow.

    main (STRING sNumber)
    {
    print (sNumber);
    }

    I want to run this main () from in my test suite, i.e., Test-Arg.s;

    Run Test-Arg.s in the following line;
    Test-Arg.t Bob

    I expected the print statement will produce Bob in the monitor.
    Instead, Error shows up when I run Test-Arg.s
    (No complie error in either _.t and _.s files.

    ---
    Script test-ms.t (Bob) - 1 error
    Machine: (local)
    Started: 11:11:55AM on 15-Oct-2001
    Elapsed: 0:00:00
    Totals: 1 error, 0 warnings
    *** Error: Incorrect number of arguments to function main
    ---

    I wonder why it give me error "*** Error: Incorrect number of arguments to function main"

    Appreciate your help!

    /John Yoo


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

  2. #2
    Senior Member
    Join Date
    May 2001
    Location
    Ankh-Morpork
    Posts
    2,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need to feed args to main()

    Umm..., you probably want to mention what tool/language this script is for, and check if there's a specific forum below to which it would be better to post this. Good luck.

    ------------------
    Charles Reace

    charles{DOT}reace{AT}verizon{DOT}net
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.</i] (The Song of Roland)

  3. #3
    Junior Member
    Join Date
    Jul 2001
    Location
    Beaverton, Oregon, USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need to feed args to main()

    Sorry,

    I always fogot the part.

    Automation tool: Silk 5.03

    I read and used testcase () with the planner but I prefer to use main () function if I can do feed the arguments into main ().

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

 

 

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 09:01 AM.

Copyright BetaSoft Inc.