This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Performs a logical exclusion operation on two Boolean expressions, or a bitwise exclusion on two numeric expressions.
Syntax
result = expression1 XOR expression2
The XOR operator syntax has these parts:
| Part | Description |
| result | Any numeric variable. |
| expression1 | Any expression. |
| expression2 | Any expression. |
Returns
Number
Remarks
For Boolean comparisons, if one and only one of the expressions evaluates to True, result is True. Otherwise, result is False.
If expression1 is |
And expression2 is |
The result is |
True |
True |
False |
True |
False |
True |
False |
True |
True |
False |
False |
False |
For numeric expressions, the Xor operator performs as a bitwise operator. A bitwise comparison of two expressions using exclusive-or logic to form the result, as shown in the following table:
If bit in expression1 is |
And bit in expression2 is |
The result is |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
Restrictions
See also
Examples