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?? Integer Array Array variable for which the size shall be obtained from.
[required]

Return Value

Description Data Type
Size of the passed array variable. Integer Number

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