[Gambas-user] Eval() and gb.eval
Demosthenes Koptsis
demosthenesk at ...626...
Sat Sep 24 17:12:48 CEST 2011
i have the next lines to make an gb.eval example
--------------------------------
Public Sub btnEval_Click()
Dim hExpression As Expression
hExpression = New Expression
hExpression.Text = txtEval.Text
txtResult.Text &= CStr(hExpression.Value) & gb.NewLine
Print Eval(txtEval.Text)
Catch
txtResult.Text &= "Error code:" & Error.Code & ", " & Error.Text &
gb.NewLine
Error.Clear
End
--------------------------------
with line
Print Eval(txtEval.Text)
i get True for "2>1"
with line
txtResult.Text &= CStr(hExpression.Value) & gb.NewLine
i get the first letter "T" for true
nothing for False
is this the desired output? i expected True / False as EVAL()
gambas3-svn4145
More information about the User
mailing list