hello new year 2010
hello dear thinbasic users and tom
here a little thinbasic example with "eval" module. never used it before, but seem to work. tom asked me last evening about this thing so I am sure it helps for 5 cents
[code=thinbasic]'-------------------------------------------------
'testcode for inputbox with evaluation by franko for tomLebowski
'-------------------------------------------------
Uses "eval", "ui"
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 myMsg As String Value = ""
Dim UserExpression As String Value = ""
Eval_SetNumber("6+8*15/4",0)
UserExpression = InputBox$("Enter an expression",, "6+8*15/4") 'not 52,5 ! correct 36 !
MsgBox 0, Eval_Math(UserExpression) '-36
myMsg += UserExpression & $CRLF
MsgBox 0, myMsg
[/code]
that's what I can do for the moment, I will check another, longer way without "eval" module. nice day, frank lionheart
Bookmarks