| Contents > CFML Reference > ColdFusion Functions > Evaluate |
|
|
|
|
||
Evaluates one or more string expressions, dynamically, from left to right. (The results of an evaluation on the left can have meaning in an expression to the right.) Returns the result of evaluating the rightmost expression.
An object; the result of the evaluation(s).
Evaluate(string_expression1 [, string_expression2 [, ... ] ] )
Parameter |
Description |
|---|---|
string_expression1, string_expression2... |
Expressions to evaluate |
String expressions can be complex. If a string expression contains a single or double quotation mark, it must be escaped.
This function is useful for forming one variable from multiple variables. For example, to reference a column of the query qNames with a variable, var, using an index value to traverse rows, you could use the following code:
<cfset var=Evaluate("qNames.#colname#[#index#]")>
For more information, see Using Expressions and Pound Signs in Developing ColdFusion MX Applications.
<!--- This shows the use of DE and Evaluate --->
<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>
...
|
|
||
| Contents > CFML Reference > ColdFusion Functions > Evaluate |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functi76.htm
Comments
halL said on Apr 15, 2004 at 2:37 PM : a440guy said on May 26, 2004 at 11:26 AM :