reflect.Value.initializeToNull

Initializes this reflect.Value to NULL.

Syntax

initializeToNull( )

Usage

The initializeToNull() method initializes to NULL the value referenced by this reflect.Value object.

This method follows the same rules as the INITIALIZE var TO NULL instruction. With a record, all members of the record are initialized to NULL. With a dynamic array, or dictionary, all elements are deleted.

Example

IMPORT reflect
MAIN
    DEFINE rec RECORD
               pkey INTEGER,
               name VARCHAR(50)
           END RECORD
    DEFINE val reflect.Value
    LET rec.pkey = 101
    LET rec.name = "Philipp Clouds"
    LET val = reflect.Value.valueOf(rec)
    CALL val.initializeToNull()
    DISPLAY "rec.pkey is null: ", (rec.pkey IS NULL)
    DISPLAY "rec.name is null: ", (rec.name IS NULL)
END MAIN
Shows:
rec.pkey is null:      1
rec.name is null:      1