Menu

multiple elements on a single line separated by commas

Help
MBB
2015-10-08
2015-10-08
  • MBB

    MBB - 2015-10-08

    In the help files under "lookup tables" it says tables can have:

       " 2.    multiple elements on a single line separated by commas."
    

    There is no example on how to do this.

    If I have this table:

    Table XYZ,
    2, 45
    6, 89
    7, 23
    9, 12
    End Table

    How would I Read the first and second values on Line 3 (7, 23)?

     
  • Anobium

    Anobium - 2015-10-08

    Reading these values is the same as reading a line sperated table list.

    Item #1 is 2
    Item #2 is 45

    Item #5 is 7
    Item #6 is 23

    I recommend you use a word variable to read the item nunber to ensure you hand tables of more than 255 items.

    So, the following is an approach.

    Dim tableItemNumber as word

    tableItemNumber = 6
    Readtable xyz, tableItemNumber, tablevalue

    Would set tablevalue to 23

     

    Last edit: Anobium 2015-10-08
  • MBB

    MBB - 2015-10-08

    That worked.

    Thanks!

     
  • Anobium

    Anobium - 2015-10-08

    Thank you for letting us know.

    Pleasure.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.