Difference between revisions of "MC-Basic:ARRAYSIZE"
Line 10: | Line 10: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | Returns the size of | + | Returns the size of an array’s dimension according to the dimension number (1 for the first dimension, 2 for the second dimension, etc.). |
− | Returns zero | + | Returns zero if the dimension number is larger than the number of dimensions defined for the array. Also returns zero if the dimension number is zero or negative. |
|TYPE= | |TYPE= |
Revision as of 06:56, 18 March 2014
Returns the size of an array’s dimension according to the dimension number (1 for the first dimension, 2 for the second dimension, etc.).
Returns zero if the dimension number is larger than the number of dimensions defined for the array. Also returns zero if the dimension number is zero or negative.
Syntax
<variable> = arraysize (<array_name>, <long_expression>)
Availability
All versions
Type
Long
Scope
Configuration, Task, Terminal
Examples
? ArraySize (Arr, 2)
Size = ArraySize (Arr, X)