[Gambas-user] Eval() and gb.eval

Demosthenes Koptsis demosthenesk at ...626...
Sat Sep 24 18:50:59 CEST 2011


so True = T and False = Null for
txtResult.Text&= CStr(hExpression.Value)&  gb.NewLine

that i also get.


I just wonder if this is correct.
i expected the same functionality with Eval().




On Sat, 2011-09-24 at 17:44 +0200, tobias wrote: 
> On 24.09.2011 17:12, Demosthenes Koptsis wrote:
> > 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()
> >
> i don't know, for me, it's the desired output.
> Print takes an expression and prints it. CStr() converts an expression 
> to a string. and the string representation of True is "T" while False is 
> Null
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list