User Tools

Site Tools


crpl:docs:xor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
crpl:docs:xor [2013/01/18 01:10] grauniadcrpl:docs:xor [2014/07/08 21:13] ParkourPenguin
Line 8: Line 8:
  
 === Description === === Description ===
-Pops two items from the stack, treats them as boolean values, 'xors' them,  +Pops two items from the stack, treats them as boolean values, 'xors' them, and pushes 0 or 1 back to the stack. 
-and pushes 0 or 1 back to the stack.+ 
 +If both items are TRUE, 0 is pushed to the stack. If both items are FALSE, 0 is pushed to the stack. If one item is TRUE and the other is FALSE, 1 is pushed to the stack.
 === Examples === === Examples ===
-<code>example goes here</code> +<code>TRUE TRUE Trace     #prints out 0 (FALSE) to the tracelog 
 +TRUE FALSE Trace    #prints out 1 (TRUE) to the tracelog 
 +FALSE TRUE Trace    #prints out 1 (TRUE) to the tracelog 
 +FALSE FALSE Trace   #prints out 0 (FALSE) to the tracelog</code> 
  
crpl/docs/xor.txt · Last modified: 2022/07/01 14:46 by Karsten75