|
Re: Re: reading lines from textfiles on Linux: msg#00207lang.smalltalk.squeak.beginners
Klaus D. Witzel wrote: > Hi Charles > > on Wed, 17 May 2006 21:51:20 +0200, you <charleshixsn@xxxxxxxxxxxxx> > wrote: > >> Perhaps, but the 16r09's are tab characters, and that is an accurate >> description of that part of the file. Also, now that I think of it >> 16r10 is the same as 0x0A, or line feed, so that part is also correct. > > What is correct? In the previous message you said "the first line is > the word 'technology' including the quotes, followed by a line feed." > >>> 16r0 (0) 16r27 16r69 16r74 16r65 16r6D 16r73 16r27 16r9 16r9 16r9 >>> 16r9 16r9 16r9 16rA 16r27 16r69 > > C'mon Charles, this *is" the first line (the one you posted earlier) > and it does *not* contain the word 'technology'. This line has 16 > characters, minus 3 quotes, minus 6 tabs, minus 1 line feed, but the > word 'technology' has more than 16 - (3 + 6 + 1) = 6 characters. > > What's your problem? What does this have to do with your problems > reading lines from textfiles on Linux? > > /Klaus > > P.S. w.r.t. your compliant about my opening of files with > #readOnlyFileNamed:, have you seen the difference? I usually do not > open files for writing when all I want is reading, even not on Linux > !-: Have a look at the implementors of #fileNamed: to see what I mean. > > _______________________________________________ > Beginners mailing list > Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx > http://lists.squeakfoundation.org/mailman/listinfo/beginners > The problem had to do with reading in a SINGLE line from a file. That has been solved. I'm sorry that I didn't remember the tab characters following the word 'technology', in that line. I was looking at a text version when I wrote that and in that line I don't use the tab characters. The first line is solely to identify what file is being read. The significant fact was that the line ended with a line feed. The solution was, when using CrLfFileStream to look for a carriage return instead of for a line feed. (Alternatively, when using FileStream to look for a line feed instead of issuing nextLine.)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Squeak and VisualWorks, Ralph Johnson |
|---|---|
| Next by Date: | workspace on:file, cdrick |
| Previous by Thread: | Re: reading lines from textfiles on Linux, Klaus D. Witzel |
| Next by Thread: | Re: Re: reading lines from textfiles on Linux, Chris Kassopulo |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |