OpenUtilities Substation Help

Logical Expressions

Logical expressions are compound relational expressions formed by combining simple relational expressions with logical operators. The logical_and operator (AND, .AND. or &&) and the logical_or operator (OR, .OR. or ||) are both binary operators. Both operands must be simple relational expressions or logical expressions that evaluate to true or false. The logical_not operator (.NOT.) requires only a single operand. The following list contains descriptions of each of the logical operators and some example logical expressions.

Operator Result
AND. , AND , or && Evaluates to true if and only if both operands are true. Otherwise it evaluates to false.
.OR. , OR , or || Evaluates to true if either operand is true. Evaluates to false if and only if both operands are false.
.NOT. or NOT Evaluates to true if the single operand is false. Evaluates to false if the operand is true.


((type == line) || (type == line_string))
((level .eq. 15) .AND. (type .ne. text))
(.NOT.(color == 5))