Quick References
Index
-------------
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Index
-------------
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
Index
-------------
dgCharge
dgEncrypt
dgFileUpload
Site
Index
-------------
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials
What's New
Partners
All Functions
Execute Method
FUNCTION: Eval()
Implemented in version 5.0
Eval
(Expression)
The
Eval
function takes a single argument, evaluates it as a VBScript expression, and returns the result of this evaluation.
If the expression is of the form a = b, it is treated as an equality comparison. If the comparison is true, then
True
is returned. Otherwise,
False
is returned.
There is a statement,
Execute
, which is similar in operation to the
Eval
function.
Execute
differs in that it interprets a string expression as one or a series of statments to be executed, and in the fact that it does not return a value.
Code:
<%
ThisVar = 5.556
AnotherVar = 5.556
%>
<% =Eval("ThisVar = AnotherVar") %>
Output:
true
Code:
<% MyVar = Eval("CInt(12345.6789)") %>
<% =MyVar %>
Output:
12345
Copyright 1999-2003 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information