<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Numeric functions > Evaluate |
Description
Evaluate a string expression to be interpreted at run-time as a thinBasic numeric expression.
Syntax
n = Evaluate(StringExpresion [, ActivateRuntimeErrors])
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
StringExpresion |
String |
No |
Text containing a valid thinBasic string expression to be evaluated at run-time |
ActivateRuntimeErrors |
Number |
Yes |
By default $() will ignore run-time errors while interpreting interpolated expressions.
Setting this optional parameter to %TRUE will generate a parsing error if one interpolated expression will generate e run-time error. |
Remarks
Restrictions
String expression must be a valid thinBasic expression in the running context and scope.
It can refer to local or global variables.
It can contains string and numeric expressions
It can contains any valid module functions active in current script.
See also
Examples
uses "console"
Single x = 10
Single y = 5
printl "Value is: " + Evaluate("x^3 - 3*x + 2")
WaitKey