Difference between revisions of "MC-Basic:ARRAYSIZE"
(Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= <''variable''> = arraysize (''<array_name>, <long_expression>)'' |AVAILABILITY= AllVersions |DESCRIPTION= Returns the size of a array’s dim…') |
|||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:ARRAYSIZE}} | ||
{{MC-Basic | {{MC-Basic | ||
|SHORT FORM= | |SHORT FORM= | ||
Line 4: | Line 5: | ||
|SYNTAX= | |SYNTAX= | ||
− | <''variable''> = arraysize ('' | + | <''variable''> = arraysize (<''array_name''>, <''long_expression''>) |
|AVAILABILITY= | |AVAILABILITY= | ||
− | + | All versions | |
|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 if the dimension number is larger | + | 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= | ||
Line 33: | Line 34: | ||
|EXAMPLE= | |EXAMPLE= | ||
− | ? ArraySize (Arr, 2) | + | |
+ | ?ArraySize (Arr, 2) | ||
Size = ArraySize (Arr, X) | Size = ArraySize (Arr, X) | ||
+ | |||
|SEE ALSO= | |SEE ALSO= | ||
− | + | [[Category:MC-Basic:Declarations|ARRAYSIZE]] | |
}} | }} |
Latest revision as of 03:07, 17 April 2017
Language: | English • 中文(简体) |
---|
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)