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.
Operator | Syntax | Description |
---|---|---|
AND | a AND b | Matches both expressions a and b. |
NOT | NOT a | Does not match expression a. |
OR | a OR b | Matches expression a or b. |
The following truth table shows how AND
and OR
work.
a | b | a AND b | a OR b |
---|---|---|---|
TRUE | TRUE | TRUE | TRUE |
TRUE | FALSE | FALSE | TRUE |
TRUE | NULL | NULL | TRUE |
FALSE | FALSE | FALSE | FALSE |
FALSE | TRUE | FALSE | TRUE |
NULL | NULL | NULL | NULL |
The following truth table shows how NOT
works.
a | NOT a |
---|---|
TRUE | FALSE |
FALSE | TRUE |
NULL | NULL |
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.