2.3  Comparison List


A constant list lets you compare an integer or enumerated value to a list of constants. The left side of a comparison list is a self-typed integer or enumerated expression. The right side is a list of integer or enumerated constants or a range of constants. The list is delimited by a vertical bar representing an or operation. A range of constants is written as the low value, the keyword 'to', followed by the high value.

The expression on the left is compared to the list of values on the right. Only the equal ('=') and not equal ('~=') operators can be used. With an equal operator the comparison is met when the expression is equal to any value in the the list. With the not equal operator the comparison is met when none of the values match.

Comparing Expressions

Compound Condition