XOR |
xor is used to define an "or logical exclusive" between two logical values.
exp1 xor exp2
|
Element |
Description |
Restrictions |
|
exp1 |
Logical_expression |
None. |
|
exp2 |
Logical_expression |
None. |
# Test : is I = 1 and J <> 2, or I <> 1 and J = 2 ?
If I = 1 xor J = 2
Infbox "One of the two conditions only is satisfactory"
Endif
xor is used to obtain a logic result (0->false, 1->true) depending on the two logic expressions taking the value true (not null) or false (null), conforming to the truth table shown below :
|
exp1 |
exp2 |
exp1 xor exp2 |
|
FALSE |
FALSE |
FALSE (=0) |
When a formula containing a 'xor' is entered in a mask or a process, for example, the keyword identification phase will substitute the keyword with the character "?" which is equivalent; it can therefore then be written equally :
exp1 xor exp2
or exp1 ? exp2
|
Error |
Description |
|
ERMODE (10) |
The arguments are not of the numeric type. |
|
|