Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Level I

## Multidimension List Possible?

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
Highlighted
Super User

## Multidimension List Possible?

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 2
Highlighted
Super User

## Multidimension List Possible?

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

A={1,2};

B={3,4};

C={A,B};

show(C[1][2]);

Highlighted
Level I

## Multidimension List Possible?

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

Article Labels

There are no labels assigned to this post.