Syntax |
Not expression |
|
Description |
Returns either a logical or binary negation of expression. |
|
Comments |
The result is determined as shown in the following table: |
|
|
If the expression is |
Then the result is |
|
TRUE |
FALSE |
|
FALSE |
TRUE |
|
NULL |
NULL |
|
Any numeric type |
A binary negation of the number. If the number is an Integer, then an Integer is returned. Otherwise, the expression is first converted to a Long, then a binary negation is performed, returning a Long. |
|
empty |
Treated as a Long value 0. |
Example |
This example demonstrates the use of the Not operator in comparing logical expressions and for switching a True/False toggle variable. Const crlf = Chr$(13) + Chr$(10) Sub Main() |
|
See Also |
Boolean (data type); Comparison Operators (topic). |
N |