Subj : long lines in a file
To : Sean Dennis
Date : Sat Dec 17 2005 05:11 pm
MP>> repeat blockread(f,buf,2048); s = copy(buf,1,255);
MP>> ansi_write_line(s); until eof(f);
SD> That sounds good and a lot faster than my suggestion. :)
I think it sounds really bad. Whenever a blockread of 2048 is performed the
file pointer is moved 2048 ahead, meaning that his procedure will read only 255
bytes out of every 2048 batch. A nice way to reduce a big text file by almost
90%, but probably not what was intended.
No, I think he'll be better off with one of the procedures I've published in
the SWAG. I don't remember right now the exact name of it, but I'm sure it can
be easily found. Should anyone be really interested, I can dig it up and give
the proper link to it...
---
* Origin:
news://felten.yi.org (2:203/2)