Xor: Difference between revisions
Jump to navigation
Jump to search
(Created page with "''result'' = ''x'' XOR ''y'' '''Description''' XOR returns the logical, exclusive disjunction of two expressions. ''result'' is TRUE, if and only if one of the expressions '...") |
(No difference)
|
Revision as of 21:23, 8 July 2012
result = x XOR y
Description
XOR returns the logical, exclusive disjunction of two expressions. result is TRUE, if and only if one of the expressions x and y evaluate to TRUE, otherwise, result is FALSE.
Example
REM XOR Example 'XOR performs exclusive disjunctions DIM Test1, Test2, x, y x = 2 y = 9 Test1 = x > 0 XOR y < 10 Test2 = x > 0 XOR y > 10 PRINT "Logical:" PRINT " x > 0 XOR y < 10 = " & CSTR(Test1) PRINT " x > 0 XOR y > 10 = " & CSTR(Test2)
Output
Logical: x > 0 XOR y < 10 = False x > 0 XOR y > 10 = True
Related Items