XOR

Performs a Boolean XOR of two logic expressions.

Syntax

expression1 XOR expression2

Parameters

expression1

Any conditional expression or Boolean expression. If the expression is complex, it must be enclosed in parentheses.

expression2

Any conditional expression or Boolean expression. If the expression is complex, it must be enclosed in parentheses.

Return Value

Logical as follows:

Truth Table for Boolean XOR

Expression 1

True

False

Expression 2

True

False

True

False

True

False

Comments

Performs a Boolean XOR (exclusive OR) of two logic expressions.

Example

LastName = "Smith" xor FirstName = "John"

The entire expression is logically true only if LastName is Smith or FirstName is John, but not both; otherwise, the entire expression is logically false.

 

Related Topics