reflect.Value.getLength
Returns the number of elements in an array.
Syntax
getLength( )
RETURNS INTEGER
Usage
The getLength()
method returns the number of elements in the array represented
by this reflect.Value
object.
The reflect.Value
object must have been created with a DYNAMIC ARRAY
or a static ARRAY[...]
variable, or is a
reflect.Value
object returned from a method like getField()
, and references a
dynamic array or static array.
Example
IMPORT reflect
MAIN
DEFINE arr DYNAMIC ARRAY OF STRING
DEFINE val reflect.Value
LET arr[1] = "aaaaa"
LET arr[2] = "bbbbb"
LET val = reflect.Value.valueOf( arr )
DISPLAY "len = ", val.getLength()
END MAIN
Shows:
len = 2