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

Eval_LinkExt

Previous pageReturn to chapter overviewNext page

 

Description

 

Define a link between a thinBasic script extended variable and an Eval_... formula variable

This function automatically will create VariableName in Eval module and will link it to an extended variable of thinBasic script.

 

Syntax

 

n = Eval_LinkExt(VariableName, PointerToAnEXTvar, InitialValue)

 

Returns

 

Number, always zero

 

Parameters

 

Name

Type

Optional

Meaning

VariableName

String

No

The name of the variable you want create

PointerToAnEXTvar

Number

No

A pointer to an extended variable present in thinBasic script

InitValue

Number

No

An initial value to assign to variable

 

Remarks

 

Use VARPTR to pass pointer to extended variable in script.

 

Restrictions

 

See also

 

Examples

 

USES "EVAL"

 

Dim result    As EXT

Dim MyScriptX As EXT

 

'--Creates an Eval internal variable X and link with script variable MyScriptX

EVAL_LinkExt("X"VARPTR(MyScriptX), 10)

 

result = EVAL_math ( "x^2"'---this return 100

 

MSGBOX 0, Result