VALUE1
xor
VALUE2

The xor operator returns true if one of the two parameters is true, false if neither or both are true.


Parameters

This operator has two parameters:

value1 – The first numeric value.

value2 – The second numeric value.


Description

The xor operator (short for exclusive or, also called exclusive disjunction) combines two Boolean values by exclusive or-ing them together. This operator yields true if exactly one (but not both) of the two parameters is true. A simple way to state this is “one or the other but not both.”

This example checks to see if two shoes are a pair:

if Shoe1="Left" xor Shoe2="Left"
    Status="Pair"
endif 

The result of this formula is true only if one shoe is Left and the other shoe is Right (or to be more precise, not Left). If both shoes are Left, or both are Right, the formula will be false.

Note: The Boolean values true and false are actually integer (numeric) values -1 and 0.

Note: If you are a “C” programmer, Panorama’s xor operator is equivalent to C’s ^ operator. (In Panorama, the ^ operator means raise to power.)


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0

1:operator_power.html


  1.  ↩︎