home *** CD-ROM | disk | FTP | other *** search
- <!--- This shows the use of DE and Evaluate --->
-
- <HTML>
-
- <HEAD>
-
- <TITLE>
- DE Example
- </TITLE>
-
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <H3>DE Example</H3>
-
- <P>This file has been disabled for online viewing. Please use your copy of ColdFusion to view this example.
-
- <!---
- <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 the Cold
- Fusion server --->
- <P>#CFCATCH.message#
- </CFOUTPUT>
- </CFCATCH>
-
- </CFTRY>
-
-
- </CFIF>
-
- <H3>Simple Expression Evaluator</H3>
- <P>Input a simple expression (e.g., 2+2) or
- A simple expression combined with CFML (e.g.,
- 32 MOD 9) and see the result, as well as the
- name of the variable used to hold the information.
-
-
- <FORM ACTION="de.cfm" METHOD="POST">
- <INPUT TYPE="Text" NAME="MyExpression" VALUE="2 + 2">
-
- <INPUT TYPE="Submit" NAME="" VALUE="Evaluate my expression">
-
- </FORM>
- --->
-
- </BODY>
-
- </HTML>
-