7.2.4 Boolean connectives

Prev Up Next Page 173 of 800 Search internet

The Boolean connectives .not. x [.not. x], x .and. y [x .and. y], and x .or. y [x .or. y] have the usual semantics when applied to Booleans. Some examples read:

.not. true == false

true .and. false == false

true .or. false == true

Note that x == y has greater charge than Boolean connectives so that e.g.

true .and. false == false


( true .and. false ) == false

When applied to non-Booleans, .not. x complains:

.not. 2 == exception

.not. bottom == exception

In contrast, true and bottom to represent falsehood. The second argument is not evaluated if the first argument suffices to determine the return value. Some examples read:

2 .and. 3 == 2

true .and. 3 == 3

2 .and. bottom == 2

The base page defines some further Boolean connectives:

x boolp [x boolp] is true if x is a boolean.

notnot x [notnot x] is the double negation of x (i.e. true if x is true and false if x is false). If x is e.g. a number then double negation throws an exception.

Prev Up Next Page 173 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05