Logical Operators

Logical operators take Boolean operands, and return a Boolean value of True or False.

Operator Meaning
&(orAND) logical AND
|(orOR) logical OR
!(orNOT) NOT

Logical operators are not case sensitive.

1 > 2 or 3 > 2 //True
1 > 2 and 3 > 2 //False
not 1 > 2 //True

Maptitude evaluates Boolean expressions with "lazy" evaluation or what is sometimes called "conditional" operations. In the Boolean expression

a or b

a is evaluated and, if the result is True, b will not be evaluated. Similarly, in the Boolean expression

a and b

b will only be evaluated if a evaluates to True.