Eval_Math

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > Eval (Math and string expression evaluator) >

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