[BUG] Reading Floats from CrLfFileStream (Windows only)

Lex Spoon lex at cc.gatech.edu
Mon Jul 10 12:16:41 UTC 2000


"Pennell, David" <DPennell at quallaby.com> wrote:
> I can certainly workaround this, but a general
> solution isn't obvious to me.  #skip:
> calls #position:.  Changing #position: to be
> semantically equivalent across FileStream and
> CrLfFileStream seems overkill.  How do other
> dialects deal with positioning on variable
> width character streams?  Should we just add
> a new moveBackOne method for use by peek?
> 

Better is just to rely on #peek, IMHO.  This is a clear operation, even in CrLfFileStream.

Agreed that it's a pain to do correct handling of position: for
CrLfFileStream.  And it's flat out impossible if they modify some text
in the middle of the stream, anyway!

Overall, it seems to me that a "text" file is mostly for reading and writing
in bulk.  If you want to modify a file in the middle, then it's a binary file!


-Lex





More information about the Squeak-dev mailing list