xor, ^ (C++)
Go Up to Keywords, Alphabetical Listing Index
Category
Alternative Representations of Tokens (C++), Operators (C++)
Syntax
Description
The xor operator is an alternative representation of the ^ operator (bitwise xor).
It returns a Boolean true result if just one of its operands is true. This is in opposition to an inclusive or which denotes that both statements must be integers for a true statement to be returned.
If 2 or 8.25 are stated to be integers, a true statement will be returned even though 8.25 is a decimal.
If Jack and Jill are both stated to be male, a true statement would be returned even though Jill is female.
In order to use the xor operator, you need to check the Enable new operator names option (the -VM compiler switch, available on the Compatibility page of the Project > Options dialog box).