580
CFML Language Reference
XOR
EQV
IMP
To enforce a specific non-standard order of evaluation, you must parenthesize
expressions. For example:
•
6 - 3 * 2 is equal to 0
•
(6 - 3) * 2 is equal to 6
Parenthesized expressions can be arbitrarily nested. When in doubt about the order in
which operators in an expression will be evaluated, always use parentheses.
Function Syntax
The following table illustrates function syntax and usage guidelines.
To learn how to insert functions in various types of expressions see
Pound Signs
.
Optional arguments in functions
Some functions may take optional arguments after their required arguments. If
omitted, optional arguments take some default value. For example:
Replace("FooFoo", "Foo", "Boo") returns "BooFoo"
Replace("FooFoo", "Foo", "Boo", "ALL") returns "BooBoo"
The difference in behavior is explained by the fact that the Replace function takes an
optional fourth argument which specifies the scope of replacement. The default value
is “ONE” which explains why only the first occurrence of “Foo” was replaced with
“Boo”. In the second example, a fourth argument is provided that forces the function to
replace all occurrences of “Foo” with “Boo”.
Function Syntax Guidelines
Usage
Example
The exception — no arguments
Function()
Basic format
Function(Data)
Nesting functions
Function1(Function2(Data))
Separate multiple arguments with
commas
Function(data1, data2, data3)
Enclose string arguments in single
or double quotes
Function(’This is a demo’) Function("This
is a demo")
Arguments are expressions
Function1(X*Y, Function2("Text"))
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...