Returns the size of one of an array's dimensions. Syntax is ArrayLength(array, dimension), counting from 0: ArrayLength(map, 0) is the first dimension and ArrayLength(map, 1) the second. For a 1D array, ArrayLength(array) on its own is the same as ArrayLength(array, 0). A dimension the array doesn't have (below 0, or past its last one) gives -1, so it can't be mistaken for a dimension of size 0.
It follows the array's sizes as they change with ReDim and EraseDim.
Returns the size of one of an array's dimensions. Syntax is ArrayLength(array, dimension), counting from 0: ArrayLength(map, 0) is the first dimension and ArrayLength(map, 1) the second. For a 1D array, ArrayLength(array) on its own is the same as ArrayLength(array, 0). A dimension the array doesn't have (below 0, or past its last one) gives -1, so it can't be mistaken for a dimension of size 0.
It follows the array's sizes as they change with ReDim and EraseDim. Works on Local and Global arrays (not yet on Fields, Consts or parameters): to use the size inside a function, pass it in as well.
Example
Example.bam
Local map:Int[40][25]
For x:Int = 0To ArrayLength(map, 0) - 1For y:Int = 0To ArrayLength(map, 1) - 1
map[x][y] = 1NextNext