> On May 10, 2016, at 12:03 PM, Louis LaBrunda [via Smalltalk]
> <ml-node+s1294792n4894224...@n4.nabble.com> wrote:
>
> Joe,
>
> At each test for the type of data you can also test to see if you found type,
> something like
> this:
>
> stream := ReadStream on: myCollection.
> [stream atEnd] whileFalse: [:item | | notFound |
> item := stream next.
> notFound := true.
> (notFound and: [your column test1]) ifTrue: [notFound := false.
> stream upToEnd].
> (notFound and: [your column test2]) ifTrue: [notFound :=
> false. stream upToEnd].
> (notFound and: [your column test3]) ifTrue: [notFound :=
> false. stream upToEnd].
> ].
>
> Not pretty but it should work.
I added a flag and set it as one of the conditions.
Also, to make reading simpler, I stacked all the booleans.
bool := bool and: (condition).
bool := bool and: (another condition).
It is not pretty, but it avoids endless seas of parentheses.
Sincerely,
Joe.
--
View this message in context:
http://forum.world.st/next-or-break-in-a-loop-tp4894095p4894238.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners