MDARRAYsizelist
(MDARRAYsizelist
origin
)
Outputs a multi-dimensional array.
The sizelist
input describes the size of each dimension in the multi-dimensional array.
The number of items in this list determines the dimension of the array.
sizelist
must be a list of one or more positive integers.
The origin
input is the index of the first element of every dimension in the output array.
If given, it must be a single integer.
If no origin
input is given, then every dimension in the array has an origin of 1.
MAKE "myarray (MDARRAY [2 3] 0)
MDSETITEM [0 0] :myarray 1
MDSETITEM [0 1] :myarray 2
MDSETITEM [0 2] :myarray 3
MDSETITEM [1 0] :myarray 4
MDSETITEM [1 1] :myarray 5
MDSETITEM [1 2] :myarray 6
SHOW :myarray
{{1 2 3} {4 5 6}}
MDITEM |
MDSETITEM |
ARRAY |