Enform Plus Reference Manual
Enform Plus Language Elements
Enform Plus Reference Manual—422684-001
3-24
Effect of Parentheses on Compound Logical
Expressions
m,n
is two integers, separated by comma, indicating that at least m characters but not
more than n characters must precede or follow string-literal when it is found
in a field value.
-
is a dash indicating any number of characters (0 through 255) can precede or follow
string-literal when it is found as a field value. Specification of a dash
indicates you do not care about the contents of this part of the field.
value-range
is a range of values with the form value-1 THRU value-2
A logical expression can be simple or compound. A simple logical expression consists
of one condition. A compound logical expression uses the Boolean operators AND, OR,
and NOT to operate over two or more logical expressions.
By using the Boolean operators AND, OR, and NOT, you have the following effect on
the evaluation of the logical expression:
•
When you precede a condition with the Boolean operator NOT, the result of the
expression is evaluated as true if the condition is evaluated as false.
•
When you join two or more conditions with the Boolean operator AND, the result of
the expression is evaluated as true only if all the conditions are evaluated as true.
•
When you join two or more conditions with the Boolean operator OR, the result of
the expression is evaluated as true if any of the conditions are evaluated as true.
Effect of Parentheses on Compound Logical Expressions
Compound logical expressions are evaluated in this sequence:
1. Conditions within parentheses are evaluated first.
2. Conditions preceded by the Boolean operator NOT are evaluated second.
3. Conditions joined with the Boolean operator AND are evaluated third.
4. Conditions joined with the Boolean operator OR are evaluated last.
BEGINS WITH and CONTAINS
BEGINS WITH and CONTAINS are special conditional operators that can be used to
yield a true or false value if a field either begins with or contains a specific alphanumeric
string.
The BEGINS WITH operator determines if a field starts with a specified alphanumeric
string. For example, the following can be used to limit the data retrieved from the
supplier field to only those records whose suppname field begins with COMPAQ:
LIST supplier WHERE suppname BEGINS WITH "COMPAQ",