Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!portal!cup.portal.com!Will From: Will@cup.portal.com (Will E Estes) Newsgroups: comp.lang.smalltalk Subject: Nested Control Structures Within Iterators Message-ID: <41040@cup.portal.com> Date: 8 Apr 91 06:58:34 GMT Organization: The Portal System (TM) Lines: 22 Can someone explain to me whether it is possible to place another control structure on the same line as an iterator? Say, for instance, that I'm iterating across a file stream and I want to continue to do so only while some condition is true. input do: [ :char | output nextPut: char. "more code here" ]. Now what I would like to do is qualify the iteration of do: such that when some condition becomes true we stop iterating? One thought that comes to mind is an equivalent to the C control structure BREAK, but I was not able to find this. Is there someone of achieving the effect of BREAK? And if not is there some way of further qualifying the iterator statement? Thanks, Will Estes Internet: Will@cup.portal.com UUCP: apple!cup.portal.com!Will