Subscribe Bookmark RSS Feed

Multidimension List Possible?

celestine

Community Trekker

Joined:

Mar 11, 2012

Hi, i was wondering, how do i declare/use a multidimensional list in the following scenario:

For( i = 1, i <=N Items( var_list_max ), i++,

               max_val={}; //initialize array

               max_name={};//initialize array

                              for(j=1,j<(col_listitems+1),j++,

                              //show name 

                              max_name=x[text box(j+13)]<<get text;

                              show(max_name);

                              //show values

                              max_val=x[numberedit box(j)]<<get text;

                              show(max_val);                       

                              );

);

i would like to use the bigger loop's variable ("i") as a subscript along with the smaller loop's variable ("j"). eg: max_val so that i can recall the value when i need it, else the code above keeps overwriting the values in the lists, max_name and max_val according to the number of col_listitems (eg 5 items and hence keep writing and overwrite every five times). Any ideas? thanks in advance!:D

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Maybe a list of lists (of lists...) is what you need?

A={1,2};

B={3,4};

C={A,B};

show(C[1][2]);

2 REPLIES
Solution

Maybe a list of lists (of lists...) is what you need?

A={1,2};

B={3,4};

C={A,B};

show(C[1][2]);

celestine

Community Trekker

Joined:

Mar 11, 2012

Thanks so much for the help MS, appreciate it!:)