[Gambas-user] Eval() and gb.eval
tobias
tobiasboe1 at ...20...
Sat Sep 24 22:27:40 CEST 2011
> yes PRINT gives TRUE.
>
> why that?
i thought, i explained it already ;)
obtaining hExpression.Value and calling Eval() do the same, you will get
the same result.
Print prints an expression, this is not limited to a string, even not
limited to a variant, because you can print objects, too, but can't
convert objects to strings.
if you assign the result of Eval() (or hExpression.Value) which is
Variant to a string, gambas automatically converts the variant
expression to a string.
so, it only matters what you do with the value. you Printed one and you
assigned the other two a string. this resulted in the expression being
printed (gives "True" in terminal) and one being converted to a string
(gives the string "T").
More information about the User
mailing list