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,038 |
Nodes: | 15 (0 / 15) |
Uptime: | 28:24:14 |
Calls: | 865 |
Calls today: | 16 |
Files: | 95,180 |
D/L today: |
14,821 files (1,487M bytes) |
Messages: | 465,164 |
Posted today: | 1 |