aka eval, in python:
eval('3 + 5')
8
I guess there is some method can do this in smalltalk. like this:
| s b| s := '[:x | x + 5]' b := SOME_WAY s " b is a block now" b value: 3
Hello
Not sure if it perfectly fits your needs, but check here
http://wiki.squeak.org/squeak/3602
bye Enno
Am 27.02.2009 um 08:12 schrieb Albert Lee:
aka eval, in python:
eval('3 + 5')
8
I guess there is some method can do this in smalltalk. like this:
| s b| s := '[:x | x + 5]' b := SOME_WAY s " b is a block now" b value: 3 _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Enno Schwass ennoausberlin@mac.com http://web.mac.com/onkelenno/iWeb/Web-Site/Blog/Blog.html
2009/2/27 ennoausberlin@mac.com:
Hello
Not sure if it perfectly fits your needs, but check here
http://wiki.squeak.org/squeak/3602
bye Enno
Yes, Thanks!
s := Compiler evaluate: '[:x :y | x + y]'. s value: 3 value: 5
Or http://www.squeaksource.com/evaluablestrings.html
2009/2/27 ennoausberlin@mac.com:
Hello
Not sure if it perfectly fits your needs, but check here
http://wiki.squeak.org/squeak/3602
bye Enno
Am 27.02.2009 um 08:12 schrieb Albert Lee:
aka eval, in python:
eval('3 + 5')
8
I guess there is some method can do this in smalltalk. like this:
| s b| s := '[:x | x + 5]' b := SOME_WAY s " b is a block now" b value: 3 _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Enno Schwass ennoausberlin@mac.com http://web.mac.com/onkelenno/iWeb/Web-Site/Blog/Blog.html
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
beginners@lists.squeakfoundation.org