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,039 |
Nodes: | 15 (1 / 14) |
Uptime: | 15:12:05 |
Calls: | 236,260 |
Calls today: | 5 |
Files: | 95,022 |
D/L today: |
11,182 files (1,411M bytes) |
Messages: | 290,789 |