Returns the logical complement of an expression.
The
NOT function returns the logical complement (inverse) of a boolean expression. Thus all expressions that evaluate to 0 become 1, and all expressions that evaluate to 1 (or any non-zero numeric value) become 0. A string is parsed as a number until a non-numeric character is encountered. Thus “7dwarves” is parsed as 7 (boolean 1), and thus
NOT returns 0. If
expression is the null string or a non-numeric value,
NOT parses it as boolean 0, and thus returns 1.