NOT function

Syntax

NOT (expression)

Description

Use the NOT function to return the logical complement of the value of expression. If the value of expression is true, the NOT function returns a value of false (0). If the value of expression is false, the NOT function returns a value of true (1).

A numeric expression that evaluates to 0 is a logical value of false. A numeric expression that evaluates to anything else, other than the null value, is a logical true.

An empty string is logically false. All other string expressions, including strings that include an empty string, spaces, or the number 0 and spaces, are logically true.

If expression evaluates to the null value, null is returned.

Example

X=5; Y=5
PRINT NOT(X-Y)
PRINT NOT(X+Y)

This is the program output:

1
0