9.10 Logically combine conditions

----------------------------------

Comparisons can be logically combined comparisons in the conditions

'if' and 'IF', and in the loops 'do{}while', 'while{}', 'WHILE{}', 'for{}'

and 'FOR{}'. Each comparison in a logical combination must be in

parentheses. No more than 32 comparisons can be combined.

In contrast to C, in C-- analysis of logical mergers takes place from

left to right, and any unmatched parentheses are interpreted by the

compiler as errors. This somewhat reduces flexibility and number of ways to

use this type of combination, but this is the tradition and philosophy of

C--.

Example:

if ( (a>3) && (b>4) || (c<8) ){

i. e., the conditional expression above is interpreted to mean that if

a>3 is true and either b>4 is true or c<8 is true the statements within the

parenthesis are executed.