IS NULL
The IS NULL
operator
checks for NULL
values.
Syntax
expr IS [NOT] NULL
- expr can be any expression supported by the language.
- The
NOT
keyword negates the comparison.
Usage
The IS NULL
operator can be used to test whether the left-hand expression is
null, while IS NOT NULL
operator can be used to test for non-null values.
This operator applies to most data types, except complex types like BYTE
and TEXT
.
Example
MAIN
DEFINE n INTEGER
LET n = NULL
IF n IS NULL THEN
DISPLAY "The variable is NULL."
END IF
END MAIN