how to do nested loops of variable depth?

Boris_Gaertner at msg.de Boris_Gaertner at msg.de
Thu Dec 20 13:35:54 UTC 2001


Hans Baveco wrote:

>>Thanks Chris, two questions though, would this work in squeak (you use 
local
>>block variables)? and would it be possible to create blocks with a 
specified
>>number of expected arguments automatically? (otherwise we still need to 
code
>>all these blocks expecting different nr of arguments onbeforehand).

The local block variables are not a problem in Squeak 3.0.
They are a problem in some earlier versions of Squeak.

The doBlock with the three arguments is only used to write
the tuples into the transcript and it is not even needed to do
that. Replace the call of the doBlock with:

  Transcript show: args printString; cr.

and you can remove that block.

The proposal of Chris is, in my opinion, a general solution.

Cheers,

Boris Gärtner


mailto: Boris_Gaertner at msg.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011220/55443921/attachment.htm


More information about the Squeak-dev mailing list