Returns the number of elements in an array.
iNumElems = ArraySize (aArray [, iDim])
Variable | Description |
---|---|
iNumElems | The number of elements in the array. INTEGER. |
aArray | The array to count. ARRAY OF ANYTYPE. |
iDim | Optional: The dimension of aArray to measure; if the array is not multi-dimensional, this argument must be 1. If omitted, the default is 1. INTEGER. |
Do not use ArraySize() with LIST variables. ArraySize() actually measures dimensions, and LIST variables have no dimensions.
The following example determines the size of the second dimension of the array aiTempPerDay. You can use ArraySize to determine whether dynamic resizing has occurred (see the example for the ArrayResize function).
iElements = ArraySize (aiTempPerDay, 2)