Hello,
A
List is one-dimensional and can hold either numeric or string values. It cannot contain other lists. For this, you may want to use a multidimensional
Array to hold your list values. In the example below, the array has 2 dimensions- the first dimension for the number of lists to keep track of, and the second dimension for the length of the lists. A do loop then takes all values from these lists into the array. Arrays in CSPro need constant dimensions, so this assumes that you have determined the number and length of lists ahead of time, and that the length of the lists can be made to match. If this is too rigid for your application, you may want to look into a multidimensional
HashMap object instead
array string myArrayOfLists(3, 6);
list string firstList = "1","2","3","4","5","6";
list string secondList = "6","5","4","3","2","1";
list string thirdList = "1","1","1","1","1","1";
do numeric i=1 until i>6
myArrayOfLists(1,i) = firstList(i);
myArrayOfLists(2,i) = secondList(i);
myArrayOfLists(3,i) = thirdList(i);
enddo;
showarray(myArrayOfLists);
Hope this helps,
Justin