Specifications
CHAPTER 23 Operators and Expressions
Users Guide 623
To compare strings when trailing blanks are significant, use an expression such
as the following to ensure that any trailing blanks are included in the
comparison:
City1 + ">" = City2 + ">"
For information about these functions, see “Using DataWindow expression
and InfoMaker functions” on page 629.
Logical operators in InfoMaker expressions
You use logical operators to combine boolean expressions into a larger boolean
expression. The result is always
true or false:
Table 23-9: Using expressions with logical operators
When you combine two or more boolean expressions to form a new expression,
the new expression is either
true or false. The following truth table shows how
true and false expressions are evaluated to form an expression that is either true
or
false.
For example, if “My dog has fleas” is
true and “My hair is brown” is false, then
“My dog has fleas OR my hair is brown” is
true, and “My dog has fleas AND
my hair is brown” is
false:
Table 23-10: Combining expressions with logical operators
Operator Meaning Example
NOT Logical negation.
If A is
true, NOT A is false. If A is false,
NOT A is
true.
NOT Price = 100
AND Logical and.
A AND B is
true if both are true. A AND B
is
false if either is false.
Tax > 3 AND Ship < 5
OR Logical or.
A OR B is
true if either is true or both are
true. A OR B is false only if both are false.
Tax > 3 OR Ship < 5
If one expression
has this value
And the
logical
operator is
And if another
expression has
this value
The resulting
expression has
this value
TRUE AND TRUE TRUE
TRUE AND FALSE FALSE
FALSE AND TRUE FALSE