[next] [prev] [prev-tail] [tail] [up]

#### 12.8.3 Boolean operators

Boolean operators can be considered as logical operations on a type with 1 bit size. Therefore the shl and shr operations have little sense. Boolean operators can only have boolean type operands, and the resulting type is always boolean. The possible operators are listed in table (12.5)

Table 12.5: Boolean operators

Operator | Operation
not | logical negation (unary)
and | logical and
or | logical or
xor | logical xor

Remark: By default, boolean expressions are evaluated with short-circuit evaluation. This means that from the moment the result of the complete expression is known, evaluation is stopped and the result is returned. For instance, in the following expression:

B := True or MaybeTrue;

The compiler will never look at the value of MaybeTrue, since it is obvious that the expression will always be True. As a result of this strategy, if MaybeTrue is a function, it will not get called ! (This can have surprising effects when used in conjunction with properties)

[next] [prev] [prev-tail] [front] [up]