SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Dec 2000
    Location
    LA,CA,USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ******!!! array definition and usage

    Can somebody answer how to define single dimentional array of string and to use it in the loop.
    Our script is like this:
    [-] main()
    [ ] integer i
    [ ] array[10] of string str
    [ ] array[10] of string company
    [ ] array[10] of string address
    [ ] array[10] of string fname
    [ ] array[10] of string username
    [ ] array[10] of string warehouse
    [-] for i = 1 to 10
    [ ] company[i] = "Testing Company" + str[i]
    [ ] address[i] = "1234 east st. apt. " + str[i]
    [ ] fname[i]= "Dmitry" + str[i]
    [ ] username[i] = "Dimtry" + str[i]
    [ ] warehouse[i] = "warehouse" + str[i]
    [ ] //lname[i) = "Rad"
    [ ] //city[i) = "LA"
    [ ] //state[i) = "CA"
    [-] for i = 1 to 10
    [ ] print (company[i])
    [ ] print (username[i])
    [ ] print (fname[i])

  2. #2
    Guest

    Re: ******!!! array definition and usage

    Perhaps the easiest way to do this is with a list.


  3. #3
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ******!!! array definition and usage

    create a record
    [-] type BLAH is record
    [ ] STRING str
    [ ] STRING company
    [ ] STRING address
    [ ] STRING username

    then create an array of items of type BLAH.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ******!!! array definition and usage

    I agree with John Burross.
    SilkTest is very good with lists.
    Programming with lists is much simpler and more maintainable than programming with arrays.

    If you were writing high performance application code, you might prefer arrays.

    But GUI testing almost never performance critical.
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  5. #5
    Junior Member
    Join Date
    Dec 2000
    Location
    LA,CA,USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ******!!! array definition and usage

    THANK YOU ALL for your response

 

 

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 12:29 PM.

Copyright BetaSoft Inc.