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

Free Components

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, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"LSD melts your mind, not in your hand." - Anon.

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