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

#### Boolean operators

Boolean operators can be considered 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 (6.5)

Table 6.5: | Boolean operators
Operator | Operation
not | logical negation (unary)
and | logical and
or | logical or
xor | logical xor

Remark: Boolean expressions are always 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]