Skip to main content

Logical Operators

Logical operators evaluate to a Boolean value or null (unknown) on one or two expressions.

The following table describes the logical operators supported by Extreme DPS.

OperatorSyntaxDescription
ANDa AND bMatches both expressions a and b.
NOTNOT aDoes not match expression a.
ORa OR bMatches expression a or b.

The following truth table shows how AND and OR work.

aba AND ba OR b
TRUETRUETRUETRUE
TRUEFALSEFALSETRUE
TRUENULLNULLTRUE
FALSEFALSEFALSEFALSE
FALSETRUEFALSETRUE
NULLNULLNULLNULL

The following truth table shows how NOT works.

aNOT a
TRUEFALSE
FALSETRUE
NULLNULL

The operators AND and OR are commutative. You can switch the right operand and the left operand without affecting the result. For example, a AND b and b AND a produce the same result.