MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 86

Developing coldfusion mx applications
Table of Contents

Advertisement

Operator
LESS THAN
GREATER THAN OR EQUAL TO
LESS THAN OR EQUAL TO
Alternative notation for decision operators
You can replace some decision operators with alternative notations to make your CFML more
compact, as shown in the following table:
Operator
IS
IS NOT
GREATER THAN
LESS THAN
GREATER THAN OR EQUAL TO
LESS THAN OR EQUAL TO
Decision operator rules
The following rules apply to decision operators:
When ColdFusion evaluates an expression that contains a decision operator other than
CONTAINS or DOES NOT CONTAIN, it first determines if the data can be converted to
numeric values. If they can be converted, it performs a numeric comparison on the data. If
they cannot be converted, it performs a string comparison. This can sometimes result in
unexpected results. For more information on this behavior, see
type conversion issues," on page
When ColdFusion evaluates an expression with CONTAINS or DOES NOT CONTAIN it
does a string comparison. The expression A CONTAINS B evaluates to True if B is a substring
of A. Therefore an expression such as the following evaluates as True:
123.45 CONTAINS 3.4
When a ColdFusion decision operator compares strings, it ignores the case. As a result, the
following expression is True:
"a" IS "A"
When a ColdFusion decision operator compares strings, it evaluates the strings from left to
right, comparing the characters in each position according to their sorting order. The first
position where the characters differ determines the relative values of the strings. As a result, the
following expressions are True:
"ab" LT "aba"
"abde" LT "ac"
86
Chapter 4: Using Expressions and Pound Signs
Description
Opposite of GREATER THAN. Return True if the value on the
left is smaller than the value on the right.
Return True if the value on the left is greater than or equal to
the value on the right.
Return True if the value on the left is less than or equal to the
value on the right.
Alternative name(s)
EQUAL, EQ
NOT EQUAL, NEQ
GT
LT
GTE, GE
LTE, LE
69.
Chapter 3, "Evaluation and

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents