Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!petunia!mjohnson From: mjohnson@cosmos.acs.calpoly.edu (Mark S. Johnson) Newsgroups: comp.lang.smalltalk Subject: Converting strings to blocks Message-ID: <28586378.5ec8@sirius.acs.calpoly.edu> Date: 14 Jun 91 06:34:32 GMT Sender: news@petunia.CalPoly.EDU (Newsman) Distribution: usa Organization: Mechanical Engrg. Dept., California Poly. State U., SLO Lines: 16 Is there an easy/good/correct way to convert a string into a block? I'd like to do something like the following: |aString aBlock| aString := '[:x | ', 'x sqrt', ']'. aBlock := aString asBlock. aBlock value: 3.0 ... You could imagine that I read the 'x sqrt' part from the terminal at runtime... The code for the "asBlock" method is what I'm looking for. Thanks in advance, Mark -- Mark S. Johnson mjohnson@stn9.me.calpoly.edu (129.65.19.9)