A character string is taken to have the value false if it is
0,
and true if it is
1. The logical operators take one or
two such values (values other than
0 or
1 are
not allowed) and return
0 or
1 as appropriate:
- &
- AND
Returns 1 if both terms are true.
- |
- Inclusive OR
Returns 1 if either term is true.
- &&
- Exclusive OR
Returns 1 if either (but not both)
is true.
- Prefix \,¬
- Logical NOT
Negates; 1 becomes 0, and 0 becomes 1.