I use multi-level arrays all the time. Apparently I do not understand them. If I make an array:
Code: Select all
put 10 into myArray["a"]["x"]
put 20 into myArray["a"]["y"]
put 30 into myArray["a"]["z"]
put 40 into myArray["b"]["x"]
put 50 into myArray["b"]["y"]
put 60 into myArray["b"]["z"]But how do I get a list of the "secondary keys" if I may call them such, of the array? In other words, how do I get "x", "y" and "z", which are the "subKeys" of "a"?. You cannot ask for:
answer myArray["a"] to see:
"x"
"y"
"z'"
because that code returns empty. You can see these in only one place that I know of, and that is in the debugger, where arrays are fully deconstructed, including all intermediate hierarchal structure, when stepping through.
On a related issue, since there are only two delimiters associated with the "combine" command, I cannot in one step fully display the above array in a field. I would have to extract all that data and format under script control.
No problem there, but is there something simple I am just not aware of?
Craig Newman
