An XOR Operator

The following function can be used to perform an XOR operation on 2 Boolean values:

BOOLEAN XOR(BOOLEAN cond1, BOOLEAN cond2) :=
          (cond1 OR cond2) AND NOT (cond1 AND cond2);