
66
DEVELOPING
COLDFUSION 9 APPLICATIONS
The CFML Programming Language
Las
t
upda
te
d 8/5/2010
Decision operators
The ColdFusion decision, or comparison, operators produce a Boolean True/False result. Many types of operation
have multiple equivalent operator forms. For example, IS and EQ perform the same operation. The following table
describes the decision operators:
Operator
Description
NOT
or !
Reverse the value of an argument. For example, NOT True is False and the inverse.
AND
or &&
Return True if both arguments are True; return False otherwise. For example, True AND True is True, but True AND
False is False.
OR
or ||
Return True if any of the arguments is True; return False otherwise. For example, True OR False is True, but False
OR False is False.
XOR
Exclusive or: Return True if one of the values is True and the other is False. Return False if both arguments are True
or both are False. For example, True XOR True is False, but True XOR False is True.
EQV
Equivalence: Return True if both operands are True or both are False. The EQV operator is the opposite of the XOR
operator. For example, True EQV True is True, but True EQV False is False.
IMP
Implication: The statement A IMP B is the equivalent of the logical statement “If A Then B.” A IMP B is False only if
A is True and B is False. It is True in all other cases.
Operator
Description
IS
EQUAL
EQ
Perform a case-insensitive comparison of two values. Return True if the values are identical.
IS NOT
NOT EQUAL
NEQ
Opposite of IS. Perform a case-insensitive comparison of two values. Return True if the values
are not identical.
CONTAINS
Return True if the value on the left contains the value on the right.
DOES NOT CONTAIN
Opposite of CONTAINS. Return True if the value on the left does not contain the value on the
right.
GREATER THAN
GT
Return True if the value on the left is greater than the value on the right.
LESS THAN
LT
Opposite of GREATER THAN. Return True if the value on the left is smaller than the value on the
right.
GREATER THAN OR EQUAL TO
GTE
GE
Return True if the value on the left is greater than or equal to the value on the right.
LESS THAN OR EQUAL TO
LTE
LE
Return True if the value on the left is less than or equal to the value on the right.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...