use Boolean (logical) operators for this:
There are several ways to write equivalent conditions, using
and,
or,
xor,
not,
and the relational operators.
Take care to write conditions as clearly as possible
NOT (TRUE) | FALSE |
NOT (FALSE) | TRUE |
Example:
not (age <= 21)
Examples:
(age >= 21) and (age <= 65)
(age > 20) and (age < 66)
(sex = 'M') and (age >= 18)
Examples:
(age < 18) or (sex = 'F')
not ( (age >= 18) and (sex = 'M') )
((age >= 60) and (sex = 'F')) or ((age >= 65) and (sex = 'M'))
Previous topic |
Next topic |
Ada Home Page |
Index
c-lokan@adfa.oz.au / 13 Feb 96