Faster way for boolean XOR?
Bobb Fwed
Posts: 1,119
Is there a better way (there almost always is) to do a conditional XOR?
IF ((cond1 AND NOT(cond2)) OR (NOT(cond1) AND cond2))
Comments
This applies a bitwise XOR to the true (-1) or false (0) values of the two <> 0 comparisons. ('Dunno why Spin lacks a logical XOR.)
-Phil
Jonathan
-Phil
I tested it, it is fastest.