Name

Evaluate

Synopsis

Evaluate(string1 [,string2] [,stringN])

Evaluates string expressions from left to right and returns the result from the rightmost expression. Evaluate( ) is useful when you need to evaluate multiple expressions at one time. Examples:

<CFSET x=1>
<CFSET y=2>
<CFSET z=3>
<CFSET Form.Name="Jim">
x=1<BR>
y=2<BR>
z=3<BR>
Form.Name=Jim
<P><CFOUTPUT>
Evaluate(1+1): #Evaluate(1+1)#<BR>
Evaluate(3 MOD 2): #Evaluate(3 MOD 2)#<BR>
Evaluate(x*y*z): #Evaluate(x*y*z)#<BR>
Evaluate(sin(1)): #Evaluate(sin(1))#<BR>
Evaluate((x+y+z)/3): #Evaluate((x+y+z)/3)#<BR>
Evaluate('Form.Name'): #Evaluate('Form.Name')#<BR>
Evaluate(7+2, 3+5): #Evaluate(7+2, 3+5)#<BR>
Evaluate(7+2, 3+5, 1/4): #Evaluate(7+2, 3+5, 1/4)#<BR>
</CFOUTPUT>

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.