Not: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
No edit summary
Line 17: Line 17:
Test3 = Not x
Test3 = Not x
Print "Logical:"
Print "Logical:"
Print "  NOT(x > 0) = " & Test1
Print "  Not(x > 0) = " & Test1
Print "  NOT(y > 10) = " & Test2
Print "  Not(y > 10) = " & Test2
</pre>
</pre>


Line 31: Line 31:
== Related Items ==
== Related Items ==


[[and|AND]], [[eqv|EQV]], [[imp|IMP]], [[or|OR]], [[xor|XOR]]
[[and|And]], [[eqv|Eqv]], [[imp|Imp]], [[or|Or]], [[xor|Xor]]


[[Category:Language Reference]]
[[Category:Language Reference]]


[[Category:Logical Operators]]
[[Category:Logical Operators]]

Revision as of 01:23, 24 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