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.
|
 |

|