Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!newsfeed.internetmci.com!news.sprintlink.net!howland.reston.ans.net!swrinde!sdd.hp.com!col.hp.com!news.dtc.hp.com!hplextra!hplb!ds
From: ds@hplb.hpl.hp.com (David Stephenson)
Subject: How do I compile a String into a BlockClosure
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Message-ID: <DByzr2.CCp@hplb.hpl.hp.com>
Date: Wed, 19 Jul 1995 15:45:02 GMT
Nntp-Posting-Host: dstephen.hpl.hp.com
Organization: Hewlett-Packard Laboratories, Bristol, England
X-Newsreader: TIN [version 1.2 PL0.7]
Keywords: SmallTalk VisualWorks 2.0
Lines: 25

I want to compile a string into a BlockClosure instance.

For example I would like to be able to do the following.

aBlock := '[ :a :b | a + b ]' asBlockClosure.

How can I do this ? 
What would the method 'asBlockClosure' look like ?

Thank in advance for any hints,

David.

ps I am using VisualWorks 2.0

--------------------------------------------------------------
Dave Stephenson         | Phone:   (44) 117 9229538 Direct dial
Hewlett-Packard Labs    |	   (44) 973 202225  Mobile
Filton Road             |          (44) 117 9799910 Switchboard 
Bristol		UK	| E-mail:  ds@hplb.hpl.hp.com   (or)
BS12 6QZ                |          ds@hpl.hp.co.uk
--------------------------------------------------------------



