ColdFusion - Evaluate one or more string expressions dynamically

Evaluate() - evaluate one or more string expressions dynamically from left to right

Evaluate.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Evaluate function example: how to evaluate one or more string expressions dynamically from left to right</title>
</head>

<body>
<h2 style="color:Crimson">Evaluate Function Example</h2>
<cfoutput>
<b>Result of expression[(10+5)*5]:</b> #Evaluate((10+5)*5)#
<br />
<b>Result of expression[(10+5+5)*5]:</b> #Evaluate((10+5+5)*5)#
<br />
<b>Result of expression[(10+5)/5]:</b> #Evaluate((10+5)/5)#
</cfoutput>
</body>
</html>






More ColdFusion examples