2.4  Compound Condition


A compound condition lets you use logical 'and' and 'or' operators to apply multiple comparisons. Comparisons are evaluated left to right. The 'and' operator has a higher precedence than 'or'. The first comparision reached satisfies the whole condition true stops evaluation of any remaining conditions.

Parenthesis cannot be used to nest conditions; preventing conditions from becoming overly complex. The use of precedence and comparison lists lets you write conditions that can be complex; yet are easy for a reader to understand.

Comparison List

Declaration Statement