DE (Delay Evaluation)

Description

Returns its argument wrapped in double quotes, and inner double quotes escaped. DE prevents evaluation of a string as an expression when it is passed as an argument to IIf or Evaluate.

Category

Dynamic evaluation functions

Syntax


DE(string) 

See also

Evaluate, IIf

Parameters

Parameter
Description
string
String to evaluate with delay

Example

<!--- This shows the use of DE and Evaluate --->

<html>

<head>

<title>DE Example</title>

</head>

<body bgcolor = silver>

<H3>DE Example</H3>

<cfif IsDefined("FORM.myExpression")>

<H3>The Expression Result</H3>



<CFTRY>

<!--- Evaluate the expression --->

<cfset myExpression = Evaluate(FORM.myExpression)>



<!--- Use DE to output the value of the variable, unevaluated --->

<cfoutput>

<I>The value of the expression #Evaluate(DE(FORM.MyExpression))#

is #MyExpression#.</I>

</cfoutput>

<!--- specify the type of error for which we are fishing --->

<CFCATCH type = "Any">

<!--- the message to display --->

  <H3>Sorry, there's been an <B>Error</B>.

  Try a simple expression, such as "2+2".</H3>

<cfoutput>

<!--- and the diagnostic message from ColdFusion Server --->

  <P>#CFCATCH.message#

</cfoutput>

</CFCATCH>

</CFTRY>

</cfif>



Banner.Novgorod.Ru