Re: [etoys-dev] If I create a text string which contains squeak code, how can I execute it from within a script?

Steve Thomas <sthomas1-gQhbkF4bah9Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <CAGa9PAZU0Y2eOjaTQ2_Semjw7fuqJydP8s8R55h-1JZe9N09Wg@mail.gmail.com>
Thanks Bert!!!

... 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.

_______________________________________________
squeakland mailing list
[email protected]
http://lists.squeakland.org/mailman/listinfo/squeakland
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.