SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Declaring a record

    Silk does not allows to declare a record within a test case. For example, when I wrote following code in a test case, it was showing an error:

    type STUDENT is record
    INTEGER iRoll
    STRING sName
    Although it works fine if it is written outside a test case. Any comments?

    ------------------
    Manoj Jain
    (manojjain99@yahoo.com)
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Declaring a record


    Everyone wants this type of thing since it's common practice to define things only within the scope their used. Only thing I can say is you'll get over it and "learn" to group items like this in a central place like a seperate INC or area in your testcase.

    Good Luck.

    Anthony

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

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Declaring a record

    Do you mean like outside of the main() function it works, but not inside of it?

    If so that's how silk works. Samething for classes.

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

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Declaring a record

    Records and Enums are new data types and must be declared outside of any main, function, or method.

    You can declare record and enum statements in a script, to make them local to the script, or place them in a test frame, and make them global.


  5. #5
    Senior Member
    Join Date
    Sep 2001
    Location
    Hyderabad, India
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Declaring a record

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John Green:
    Records and Enums are new data types and must be declared outside of any main, function, or method.

    You can declare record and enum statements in a script, to make them local to the script, or place them in a test frame, and make them global.

    <HR></BLOCKQUOTE>
    Yes. I am not able to declare them within a method. Can you please put some light on it why this is implemented this way?


    ------------------
    Manoj Jain
    (manojjain99@yahoo.com)
    Manoj Jain
    (manojjain99@yahoo.com)
    A highly advanced bug is indistinguishable from a feature.

 

 

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:27 PM.

Copyright BetaSoft Inc.