[etoys-dev] [squeakland] If I create a text string which contains squeak code, how can I execute it from within a script?
sthomas1 at gosargon.com
Thu Feb 2 00:20:49 EST 2012
... and to be a bit less brief, a simple way to introduce variables is
> compiling a block:
> (Compiler evaluate: '[:a :b | a + b ]') value: 3 value: 4
Also see attached your project, enhanced.
> [I'd get rid of the D and S and the assignment, just have the kids enter
> "x + 25". Makes the veal code simpler. Also, watch out for "3 + 4 * 5"
> having not the same result as when using Etoys tiles. The way around that
> would be to implement an actual grammar for your functions, not just re-use
> the Smalltalk grammar]
Good idea. I made the changes and am playing around with Compiler evaluate.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the etoys-dev