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,166 |
| Nodes: | 17 (0 / 17) |
| Uptime: | 419:53:51 |
| Calls: | 509,423 |
| Calls today: | 9 |
| Files: | 262,756 |
| D/L today: |
6,070 files (1,677M bytes) |
| Messages: | 469,911 |
| Posted today: | 5 |