num_elements()
Returns the size of the requested array variable, that is the amount of total values that array variable contains.
Function Prototype
num_elements(array-variable)
Arguments
Argument Name | Data Type | Description |
---|---|---|
array-variable |
Array Variable | Array variable for which the size shall be obtained from. [required] |
Return Value
Data Type | Description |
---|---|
Integer Number | Size of the passed array variable. |
Examples
- on init
- declare const $SIZE := 5
- declare %a[$SIZE] := ( 0,1,2,3,4 )
- $i := 0
- while ($i < num_elements(%a))
- message("array[" & $i & "] = " & %a[$i])
- $i := $i + 1
- end while
- end on
Document Updated: 2019-09-16 | Author: Christian Schoenebeck