Boolean values¶
Datatypes and constructors¶
The literals for Boolean values are True and False. The name
of the datatype is Bool.
Example:
Bool value = True;
Operators¶
The following operators apply to Boolean values:
Expression |
Meaning |
Associativity |
|---|---|---|
|
logical or |
left |
|
logical and |
left |
|
equality |
left |
|
inequality |
left |
|
less than |
left |
|
less or equal |
left |
|
greater than |
left |
|
greater or equal |
left |
|
logical negation |
right |
The semantics of “less than” and similar operators for Booleans follow
the rules for algebraic datatypes, see Operator expressions
(in short, False < True).