logo       

Re: Problems with do:: msg#00104

lang.smalltalk.squeak.beginners

Subject: Re: Problems with do:

You could do something like
[aFileStream atEnd] whileFalse: [line := aFileStream nextLine.
Transcipt show: line: cr.]

Alternatively, you could convert your stream of characters into a
stream of lines. I described something similar in
http://wiki.cs.uiuc.edu/PatternStories/FunWithStreams but it created a
stream of words instead of a stream of lines. Read that, and you
should be able to make a LineStream pretty easily.

-Ralph Johnson


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise