read seperate lines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • lucufa
    Forum Member
    • Jan 2007
    • 24

    read seperate lines

    Hey,

    does ams support reading lines? or Table.Copy();? i looked into combo-boxes/inputs and tables.

    and table is the only one who can see which line is what.. eg. Table.Remove(blah, 2); which would remove line 2, a Table.Copy function would be useful but ams doesn't have it, anything to copy a certain line in data?
  • bule
    Indigo Rose Customer
    • May 2005
    • 1116

    #2
    Try it like this:
    Code:
    --original table example:
    table1={1,2,3,4,5,6};
    
    --to copy table1 to table2:
    table2={};
    for index,item in table1 do
    table2[index]=table1[index];
    end
    Never know what life is gonna throw at you. ZubTech

    Comment

    • lucufa
      Forum Member
      • Jan 2007
      • 24

      #3
      ok i have no clue what the above code means, or how it works. more description for a newbie like me maybe? or.. i just thought of this idea.. how about say i have 10 lines of data in the table i remove every line except the line i want, so if i want line 2 i remove 1,3,4-10 and process 1 link by link? i think that would work right :yes

      Comment

      • bule
        Indigo Rose Customer
        • May 2005
        • 1116

        #4
        The upper code iterates through the table1 item by item and adds them to table2. Here is another variation:

        Code:
        --original table example:
        table1={1,2,3,4,5,6};
        
        --to copy table1 to table2:
        table2={};
        for index,item in table1 do
        table2[index]=item;
        end
        Never know what life is gonna throw at you. ZubTech

        Comment

        Working...
        X