NULL as a Value
A null value is different from an empty string, a blank field, or zero. For instance, both EMPTY( ) and ISBLANK( ) return true (.T.) when a variable contains blank or an empty string. EMPTY( ) also returns true (.T.) for zero. ISNULL( ) returns false (.F.) for these values and both EMPTY( ) and ISBLANK( ) return false (.F.) for null values.
You can use null values with array and field commands like STORE, GATHER, and SCATTER. The following example assigns .NULL
. to each member of the array aX
:
DIMENSION aX[4]
STORE .NULL. TO aX
The null value is not a data type. When you assign .NULL. to a field or variable, the value changes to .NULL. but the data type of the field or variable does not change. For example:
STORE 5 TO nX
nX = .NULL.
? TYPE ("nX") && Data type reported as numeric
See Also
Behavior of Null Values in Logical Expressions | Behavior of Null Values in Commands and Functions | EMPTY( ) Function | ISBLANK( ) Function | ISNULL( ) Function | Null Value Handling | Data Manipulation | NULL as a Parameter