Hi Frank,
I'm sorry but this is not a correct example because Eval_SetNumber is not used in the correct way.
Please read manual (well, maybe I have to improve it): Eval_SetNumber creates a variable in the Eval environment.
So a typical usage could be Eval_SetNumber("MyVariable", 1234)
Check examples in \thinBasic\SampleScripts\Eval\
Here a possible correct example:
[code=thinbasic]
Uses "eval"
Dim Prompt As String Value = "Enter Some thing here"
Dim Title As String Value = "InputBox Example"
Dim DefaultText As String Value = "press keyboard keys to change me"
Dim UserExpression As String
Dim Result As Ext
'---Creates an Eval variable to be used in expressions
Eval_SetNumber("MyDivider", 4)
'---Ask for a math expression to be evaluated (here you can use your created variables)
UserExpression = InputBox$("Enter an expression",, "6+8*15/MyDivider")
'---Evaluate the expression
Result = Eval_Math(UserExpression)
'---Show result
MsgBox 0, "Result of " & UserExpression & " is:" & _
$CRLF(2) & Result
[/code]
Ciao
Eros
Bookmarks