Forgot a usual fourth way:

you also forgot an "un" before usual, didn't you? :-)

nice trick, but i've never seen it anywhere!

4) use a Stream.

exit := false.
stream := (1 to: 10) readStream.
[ exitLoop or: [stream atEnd]]
    whileFalse: [| x |
        x := stream next.
        x = 3
            ifTrue: [exit := true]
            ifFalse: [...]].

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to