User Guide

566 Chapter 3: ColdFusion Functions
DE
Description
Escapes any double-quotation marks in the parameter and wraps the result in double-quotation
marks.
Returns
Parameter, surrounded by double-quotation marks, with any inner double-quotation marks
escaped.
Category
Dynamic evaluation functions
Function syntax
DE(string)
See also
Evaluate
, IIf, Chapter 4, “Using Expressions and Number Signs” in ColdFusion MX Developer’s
Guide
Parameters
Usage
The DE function postpones evaluation of a string that is passed as a parameter to the IIf or
Evaluate functions.
This function is especially useful with the
IIf function, which automatically evaluates its second
and third parameters as expressions. You can use the
DE function to prevent the function from
evaluating a string parameter that is to be output as a variable, and should not be treated as an
expression. The following example show this use; it uses
IIF to alternate table-row background
colors, white and gray, and uses the
DE function to prevent ColdFusion from evaluating the color
strings.
<cfoutput>
<table border="1" cellpadding="3">
<cfloop index="i" from="1" to="10">
<tr bgcolor="#IIF( i mod 2 eq 0, DE("white"), DE("gray") )#">
<td>
hello #i#
</td>
</tr>
</cfloop>
</table>
</cfoutput>
The DE function does not delay evaluation of variable names that are surrounded by number signs
(#). ColdFusion function evaluates the variable regardless of whether the
DE function is present.
Parameter Description
string String to evaluate, after delay