FMX beginner needs info about eval

Hi All,

I have a question about eval - I’m pretty sure that I can’t use it the way I would use Java’s eval so my question is really… is there something out there that works like the Java eval or do I need to write it myself?

I need to write something that will parse a string and then evaluate the expression that results like “x += 10” where x is a variable name and then the action to be taken against x.

Any help would be greatly appreciated.

Thanks in advance,
Liz

I’m pretty sure you have to parse that String by hand, unfortunately. There are quite a few Actionscript parsers on the web though.

http://www.flashcomponents.net/component.cfm?nav=2&id=118

The downside of course, aside from lack of full compatibility (which it doesnt seem you need) is the fact that this process of parsing strings is much slower than normal calculations.

Oh well. Thanks for the help, that’s kind of what I thought though :frowning: