result = NOT expression
Description
NOT returns the logical negation of an expression. The required argument, expression, is any valid expression. result is TRUE if expression evaluates to FALSE, FALSE if expression evaluates to TRUE, result is NULL otherwise.
NOT also does a bitwise inversion of an expression. Each bit in result is set to 1 if the corresponding bit in expression is 0, otherwise it is set to 0.
Example
REM NOT Example
'NOT doeslogicalnegation&bitwiseinversion
DIM Test1, Test2, Test3, x, y
x = 3
y = 8
Test1 = NOT(x > 0)
Test2 = NOT(y > 10)
Test3 = NOT x
PRINT "Logical:"
PRINT " NOT(x > 0) = " & Test1
PRINT " NOT(y > 10) = " & Test2
PRINT "Bitwise:"
PRINT " NOT x = " & Test3
Output
Logical:
NOT(x > 0) = False
NOT(y > 10) = True
Bitwise:
NOT x = -4
Related Items
AND, EQV, IMP, OR, XOR