User Guide

Table Of Contents
78 Chapter 4: Using Expressions and Number Signs
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 “Evaluation and type
conversion issues” on page 61.
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"
String operators
There is one string operator, which is the concatenation operator.
Note: In a Query of Queries, you use || as the concatenation operator.
LESS THAN LT
GREATER THAN OR EQUAL TO GTE, GE
LESS THAN OR EQUAL TO LTE, LE
Operator Description
& Concatenates strings.
Operator Alternative name(s)