Chapter 4: ColdFusion Expressions: Operators and Other Constructs
579
Boolean operators
Boolean, or Logical, operators perform logical connective and negation operations.
The operands of Boolean operators are Boolean (TRUE/FALSE) values.
Operator Precedence
The order of precedence controls which operator is evaluated first in an expression.
Operators on the same line have the same precedence.
Unary +, Unary -
^
*, /
\
MOD
+, -
&
EQ, NEQ, LT, LTE, GT, GTE, CONTAINS, DOES NOT CONTAIN
NOT
AND
OR
Boolean Operators
Operator
Description
NOT
Reverses the value of an argument. For example, NOT
TRUE is FALSE and vice versa.
AND
Returns TRUE if both arguments are TRUE; returns FALSE
otherwise. For example, TRUE AND TRUE is TRUE, but
TRUE AND FALSE is FALSE.
OR
Returns TRUE if any of the arguments is TRUE; returns
FALSE otherwise. For example, TRUE OR FALSE is TRUE,
but FALSE OR FALSE is FALSE.
XOR
Exclusive or—either, or, but not both. Returns TRUE if the
truth values of both arguments are different; returns
FALSE otherwise. For example, TRUE XOR TRUE is FALSE,
but TRUE XOR FALSE is TRUE.
EQV
Equivalence both true or both 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. A IMP B is the truth value of the logical
statement “If A Then B.” A IMP B is FALSE only when A is
TRUE and B is FALSE.
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...