Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

Eval

The Eval function will evaluate an expression that is stored in a string and return the result of that evaluation. This allows you to build dynamic ASP expressions at runtime and evaluate them using the Active Server Pages expression parser.

Dim nOne, nTwo, nThree, sExpr

nOne = 22
nTwo = 44
nThree = 6

sExpr = "((nOne + nTwo) / nThree)"
Response.Write "Result is: " & Eval(sExpr)


If the expression is in the form sExp1 = sExp2, the statement will be treated as a boolean comparision and return a value of true if the expressions are equal, false when the expressions are not equal.

For a much more powerful ASP parser, you should look into the Evaluate subroutine.

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image." - Stephen Hawking

©2010 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.