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:

 CopyCode imageCopy Code
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:

 CopyCode imageCopy Code
STORE 5 TO nX
nX = .NULL.
? TYPE ("nX")  && Data type reported as numeric

See Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic