>>>>> "Mark" == Mark Volkmann <[EMAIL PROTECTED]> writes:

Mark> stream := WriteStream on: ''.
Mark> stream nextPutAll: 'foo'.
Mark> stream nextPutAll: 'bar'.
Mark> s := stream contents

s := String streamContents: [:stream |
  stream
        nextPutAll: 'foo';
        nextPutAll: 'bar'.
].

Then you don't even have to name the stream, because it has that
temporary name inside the block.

Look for the many senders of #streamContents: as examples.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to