<div class='shrinkable-quote'><br/>&gt; On May 10, 2016, at 12:03 PM, Louis LaBrunda [via Smalltalk] &lt;<a href="/user/SendEmail.jtp?type=node&node=4894238&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<br/>&gt; 
<br/>&gt; Joe, 
<br/>&gt; 
<br/>&gt; At each test for the type of data you can also test to see if you found type, something like 
<br/>&gt; this: 
<br/>&gt; 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; stream := ReadStream on: myCollection. 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; [stream atEnd] whileFalse: [:item | | notFound | 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item := stream next. 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; notFound := true. 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;        (notFound and: [your column test1]) ifTrue: [notFound := false. stream upToEnd]. 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (notFound and: [your column test2]) ifTrue: [notFound := false. stream upToEnd]. 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (notFound and: [your column test3]) ifTrue: [notFound := false. stream upToEnd]. 
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ]. 
<br/>&gt; 
<br/>&gt; Not pretty but it should work. 
</div><br/>I added a flag and set it as one of the conditions.
<br/><br/>Also, to make reading simpler, I stacked all the booleans.
<br/><br/>bool := bool and: (condition).
<br/>bool := bool and: (another condition).
<br/><br/>It is not pretty, but it avoids endless seas of parentheses.
<br/><br/>Sincerely,
<br/><br/>Joe.
<br/><br/><br/>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/next-or-break-in-a-loop-tp4894095p4894238.html">Re: next or break in a loop</a><br/>
Sent from the <a href="http://forum.world.st/Squeak-Beginners-f107673.html">Squeak - Beginners mailing list archive</a> at Nabble.com.<br/>