Difference between revisions of "Xor"

From WikiManual
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Takes the two top values on the conditions stack and xor's them together. If one of the conditions is true and one is false it puts true on the stack. If both are true, or if both are false, it puts false on the stack.  
+
Takes the two top values on the boolean stack and xor's them together. If one is true and one is false it places true on the stack. If both are true, or if both are false, it places false on the stack.  
  
=== Logical Operators===
+
false false and    ''puts''''' false '''''on the stack''
* [[and]]
+
true false and    ''puts''''' true '''''on the stack''
* [[or]]
+
false true and     ''puts''''' true '''''on the stack''
* [[xor]]
+
true true and      ''puts''''' false '''''on the stack''
* [[not]]
+
 
 +
{{logic}}

Latest revision as of 16:40, 10 November 2007

Takes the two top values on the boolean stack and xor's them together. If one is true and one is false it places true on the stack. If both are true, or if both are false, it places false on the stack.

false false and    puts false on the stack
true false and     puts true on the stack
false true and     puts true on the stack
true true and      puts false on the stack

Logic:

true
false
and
or
not
xor