Mail Archives: djgpp/1996/05/01/16:36:40
On 30 Apr 1996, Paul Derbyshire wrote:
> I've seen this myself. Printf buffers things. Use cprintf, if you want to
> avoid the \n and the problems this may cause on the bottom screen line.
> Cprintf also enables colored text and backgrounds. On the other hand the
> text it produces isn't captured by DOS redirection commands, i.e. to
> printer or to a file (I don't think it is anyways...?)
cprintf is CONSOLE printf. it prints to the CONSOLE. the console is always
the screen, not a file, not a device (well actually the console IS a
device). It is usually faster because it writes directly to the screen
rather than to stdout, which is (after being flushed) written to the
screen. cprintf is cool when you are sure you want the text to go to the
screen, and never anywhere else. BTW you may have to use \r\n instead of
just \n when using printf (cr/lf rather than just lf).
Justin
- Raw text -