Expressions
85
Boolean operators
Boolean, or logical, operators perform logical connective and negation operations. The operands
of Boolean operators are Boolean (True/False) values.The following table describes the Boolean
operators:
Decision operators
The ColdFusion decision, or comparison, operators produce a Boolean True/False result. The
following table describes the decision operators:
\
Integer division: Divide an integer by another integer. Use the backslash character (\) to
separate the integers. The right operand cannot be zero. For example, 9\4 is 2.
^
Exponentiation: Return the result of a number raised to a power (exponent). Use the
caret character (^) to separate the number from the power; for example, 2^3 is 8. Real
and negative numbers are allowed for both the base and the exponent. However, any
expression that equates to an imaginary number, such -1^.5 results in the string "-1.#IND.
ColdFusion does not support imaginary or complex numbers.
Operator Description
NOT
Reverse the value of an argument. For example, NOT True is False and vice versa.
AND
Return True if both arguments are True; return False otherwise. For example, True AND
True is True, but True AND False is False.
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
Perform a case-insensitive comparison of two values. Return
True if the values are identical.
IS NOT
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
Return True if the value on the left is greater than the value on
the right.
Operator Description
Summary of Contents for ColdFusion MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......