Used to perform logical negation on an expression.
result = Not expression
The Not operator syntax has these parts:
Part |
Description |
result |
Any numeric variable. |
expression |
Any expression. |
The following table illustrates how result is determined:
If expression is |
Then result is |
True |
False |
False |
True |
Null |
Null |
In addition, the Not operator inverts the bit values of any variable and sets the corresponding bit in result according to the following truth table:
Bit in expression |
Bit in result |
0 |
1 |
1 |
0 |
Operator Precedence.
This example uses the Not operator to perform logical negation on an expression.
A = 10: B = 8: C = 6: D = Null ' Initialize variables.= Not(A > B) ' Returns False.= Not(B > A) ' Returns True.= Not(C > D) ' Returns Null.= Not A ' Returns -11 (bit-wise comparison).