Xorvar: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
xorvar <[[gamevar]]> <number> | '''xorvar''' <[[gamevar]]> <number> | ||
This function gives the result of a XOR function of the [[gamevar]] <gamevar> with <value>. The function checks the bits of the two values being compared, and the bits in the result are set if one, and only one, of the values being operated on has those bits set. See [[xorvarvar]]. | This function gives the result of a XOR function of the [[gamevar]] <gamevar> with <value>. The function checks the bits of the two values being compared, and the bits in the result are set if one, and only one, of the values being operated on has those bits set. See [[xorvarvar]]. |
Revision as of 12:42, 4 May 2009
xorvar <gamevar> <number>
This function gives the result of a XOR function of the gamevar <gamevar> with <value>. The function checks the bits of the two values being compared, and the bits in the result are set if one, and only one, of the values being operated on has those bits set. See xorvarvar.
Here is an example using xorvar to raise 5 to a power of 2
setvar a_number 5 xorvar a_number 2