Navigation: thinBasic Modules > Eval > Eval_Math |
|
Description
Evaluate a string expression representing a math function and returns calculated result.
Syntax
n = Eval_Math(StringBufferToEvaluate)
Returns
Number: the result of the math evaluation
Parameters
Name |
Type |
Optional |
Meaning |
StringBufferToEvaluate |
String |
No |
A string expression containing the math expression to evaluate |
Remarks
List of supported keywords inside Eval: see here.
Restrictions
See also
Examples
USES "EVAL"
Dim result As EXT
EVAL_SETNUMBER ( "x", 10 )
result = EVAL_math ( "x^2") '---this return 100
MSGBOX 0, Result
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |