Hi all,
I'm trying to do something like
string $a= "10+5";
int $b = eval $a;
and I want of course that $b is set to 15...
but I get a syntax error, even when I try other syntax...
does anybody have a suggestion?
thanks - Nicola
Hi all,
I'm trying to do something like
string $a= "10+5";
int $b = eval $a;
and I want of course that $b is set to 15...
but I get a syntax error, even when I try other syntax...
does anybody have a suggestion?
thanks - Nicola
MEL eval does NOT return anything meaningful. It just executes the interior statement. So that will not work.
Further it would be a bit bad design to do that either. Since you can allays pre evaluate this on change and form users point of view you'd get it working exactly the same but without getting the HUGE speed penalty of not being able to compile the code up front.
Anyway care to describe what you want this to do for you and ill tell you a easier approach.