in reply to 'xor' operator is not a sibling to 'or' and 'and'?
It seems that, 'xor' not only evaluates one or both expressions surrounding it, but also evaluates logical XOR of these expressions, when 'or' and 'and' operators don't do this
huh? That's exactly what or and and do (aside from evaluating logical OR and AND respectively, of course).
At the last line of output I expected to get '3'!
TRUE XOR TRUE = FALSE, so 2 xor 3 can't possibly return 3, a true value.
|
|---|