Hi HKJ,
Does TC scripting support multi-dimensional array variables?
I see the array with =var MyVar[1] type syntax for a single dimension/single index array. But can you have two indexes? For example 10000 by 6? I tired a few variations of possible syntax but none of them worked.
A array is a normal variable and each entry in a array is also a normal variable, i.e. you can have any dimension you want.
You use the array() function to create a array variable:
=var a=array(array(1,2,3),array(4,5,6),array(7,8,9))
=a
;; {{=1, =2, =3}, {=4, =5, =6}, {=7, =8, =9}}
It is not as such a multidimensional array, because each element do not need to be an array, but can be anything:
=var d=array(array(1,2,3),"Hello world",array(7,8,array(10,11,12)) )
=d
;; {{=1, =2, =3}, ="Hello world", {=7, =8, {=10, =11, =12}}}
You can also use this function to show contents of variables:
=displayVar(d)
Also note that a 10000 x 6 will be rather heavy on memory usage. I do also have vector and matrix types that are much more economic on memory, but I have not documented them very much, because I am not finished with them and they are not something I expect people will use in TC.