What would you guys suggest as the best way to handle such
situations? blockread() then parse 255 characters at a time?
What would you guys suggest as the best way to handle such situations? blockread() then parse 255 characters at a time?
What would you guys suggest as the best way to handle such
situations? blockread() then parse 255 characters at a time?
...or maybe you could write a procedure to parse the ANSI codes "on the fly" that way you can just read everything in one character at a time, but parse ANSI as it comes in.
I don't know much about blockread, but hope this might help somehow.
repeat blockread(f,buf,2048); s = copy(buf,1,255); ansi_write_line(s); until eof(f);
repeat blockread(f,buf,2048); s = copy(buf,1,255);
ansi_write_line(s); until eof(f);
That sounds good and a lot faster than my suggestion. :)
I think it sounds really bad. Whenever a blockread of 2048 is
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...
[cut]What would you guys suggest as the best way to handle such
situations? blockread() then parse 255 characters at a time?
Character by character would be waaaay to slow.
repeat
blockread(f,buf,2048);
s = copy(buf,1,255);
ansi_write_line(s);
until eof(f);
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,050 |
Nodes: | 15 (1 / 14) |
Uptime: | 80:12:25 |
Calls: | 236,065 |
Calls today: | 13 |
Files: | 60,364 |
D/L today: |
110 files (105M bytes) |
Messages: | 289,890 |
Posted today: | 4 |