| CFML Reference
|
|
ColdFusion Functions
|
Evaluate
Description
Evaluates arguments, left to right; returns the result of evaluating the last argument.
Category
Dynamic evaluation functions
Syntax
Evaluate(string_expression1 [, string_expression2 [, ... ] ] )
See also
DE (Delay Evaluation), IIf
Parameters
| Parameter |
Description |
string_expression1, string_expression2
|
Expressions to evaluate
|
Usage
String expressions can be complex. They are complicated to write, because they are inside a string. If a string expression is double-quoted, double-quotes inside the expression must be escaped.
Example <!--- This shows the use of DE and Evaluate --->
<html>
<head>
<title>
Evaluate Example
</title>
</head>
<body bgcolor = silver>
<H3>Evaluate 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>
...
|
Copyright © 2001, Macromedia Inc. All rights reserved. |
|
|