[Gambas-user] Eval Gambas2

Benoît Minisini gambas at ...1...
Wed Jan 5 10:23:53 CET 2011


> Hi,
> 
> I'm trying to implement some sort of basic scripting with the use of
> Eval() inside my project.
> 
> It works for a lot of math, formatting and comparison commands and works
> quite nicely.
> 
> But I need the IF THEN to work too.
> 
> IIf ( Test AS Boolean , TrueExpression , FalseExpression ,
> FalseExpression ) or
> If ( Test AS Boolean , TrueExpression , FalseExpression )
> 
> Works,  but evaluates both TrueExpression and FalseExpression regardless
> of test (as explained in docs)
> 
> Is there a way to get
> IF Test THEN TrueExpression
> to work inside Eval() ?
> 
> Regards,
> Ron_2nd.
> 

No way. Eval() only evaluates expressions.

-- 
Benoît Minisini




More information about the User mailing list