Not: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
No edit summary
Line 32: Line 32:


[[and|AND]], [[eqv|EQV]], [[imp|IMP]], [[or|OR]], [[xor|XOR]]
[[and|AND]], [[eqv|EQV]], [[imp|IMP]], [[or|OR]], [[xor|XOR]]
[[Category:Language Reference]]
[[Category:Logical Operators]]

Revision as of 15:29, 7 August 2012

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.

Example

REM NOT Example
'NOT does logical negation & bitwise inversion
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

Output

Logical:
  NOT(x > 0) = False
  NOT(y > 10) = True

Related Items

AND, EQV, IMP, OR, XOR