reflect.Value.appendArrayElement

Appends a new element to an array.

Syntax

appendArrayElement()

Usage

The appendArrayElement() method adds a new element to the end of the array represented by this reflect.Value object.

The reflect.Value object used to call this method must have been created from a DYNAMIC ARRAY variable, or is a reflect.Value object returned from a method like getField(), and references a dynamic array.

Example

IMPORT reflect
MAIN
    DEFINE arr DYNAMIC ARRAY OF STRING
    DEFINE val reflect.Value
    LET val = reflect.Value.valueOf( arr )
    CALL val.appendArrayElement()
    DISPLAY "len = ", arr.getLength()
END MAIN
Shows:
len =           1