Abbreviated Combined Relation Conditions

When simple or negated simple relation conditions are combined with logical connectives in a consecutive sequence such that a succeeding relation condition contains a subject or subject and relational operator that is common with the preceding relation condition, and no parentheses are used within such a consecutive sequence, any relation condition except the first can be abbreviated by either of the following means:

General Format

説明:

Within a sequence of relation conditions both of the above forms of abbreviation can be used. The effect of using such abbreviations is as if the last preceding stated subject were inserted in place of the omitted subject, and the last stated relational operator were inserted in place of the omitted relational operator. The result of such implied insertion must comply with the rules of the table Relational Operators. This insertion of an omitted subject and/or relational operator terminates once a complete simple condition is encountered within a complex condition.

OSVSThe order of evaluation of the conditions can be prioritized by the use of parentheses (see example below).

The interpretation applied to the use of the word "NOT" in an abbreviated combined relation condition is as follows:

  1. ANS85If NOT is immediately followed by the word GREATER, >, LESS, <, EQUAL, or =, excluding the relational operators GREATER THAN OR EQUAL TO, >=, LESS THAN OR EQUAL TO, and <=, then the word NOT is interpreted as part of the relational operator, otherwise:
  2. The "NOT" is interpreted as a logical operator and, therefore, the implied insertion of subject or relational operator results in a negated relation condition.

Some examples of abbreviated combined and negated combined relation conditions and expanded equivalents follow.

Abbreviated Combined Relation Condition Expanded Equivalent
a > b AND NOT < c OR d   ((a > b) AND (a NOT < c)) OR (a NOT < d)  
a NOT EQUAL b OR c   (a NOT EQUAL b) OR (a NOT EQUAL c)  
NOT a = b OR c   (NOT (a = b)) OR (a = c)  
NOT (a GREATER b OR < c)   NOT ((a GREATER b) OR (a < c))  
NOT (a NOT > b AND c AND NOT d   NOT ((((a NOT > b) AND (a NOT > c)) AND (NOT (a NOT > d))))  
x > a OR y AND z   x > a OR (x > y AND x > z)  
OSVSx > a OR (y AND z)   x > a OR (x > y AND x > z)  
OSVSx > (a OR y) AND z   (x > a OR x > y) AND x > z  
OSVSx ( = a OR > b)   x = a OR x > b  
OSVSx = a AND ( > b OR < z )   x = a AND ( x > b OR x < z )  
a EQUAL b OR NOT GREATER OR EQUAL c OR d   (a EQUAL b) OR (NOT (a GREATER OR EQUAL c)) OR (a GREATER OR EQUAL d)  
a EQUAL b OR NOT >=c OR d   (a EQUAL b) OR (NOT (a >= c)) OR (a >= d)  

Condition Evaluation Rules

Parentheses can be used to specify the order in which individual conditions of complex conditions are to be evaluated when it is necessary to depart from the implied evaluation precedence.

Conditions within parentheses are evaluated first, and, within nested parentheses, evaluation proceeds from the least inclusive condition to the most inclusive condition. When parentheses are not used, or parenthesized conditions are at the same level of inclusiveness, the following hierarchical order of logical evaluation is implied until the final truth value is determined:

  1. ANS85Values are established for arithmetic expressions and functions if and when the conditions containing them are evaluated. Similarly, negated conditions are evaluated if and when it is necessary to evaluate the complex condition that they represent. (See the section Formation and Evaluation Rules.)
  2. Truth values for simple conditions are established in the following order:

    relation (following the expansion of any abbreviated relation condition) class condition-name switch-status sign

  3. Truth values for negated conditions are established.
  4. Truth values for combined conditions are established: "AND" logical operators, followed by "OR" logical operators.
  5. Truth values for negated combined conditions are established.
  6. When the sequence of evaluation is not completely specified by parentheses, the order of evaluation of consecutive operations of the same hierarchical level is from left to right.