Date: Wed, 1 May 1996 16:27:06 -0400 (EDT) From: Justin Ward To: Paul Derbyshire cc: djgpp AT delorie DOT com Subject: Re: Odd printf behaviour In-Reply-To: <4m3snk$40@freenet-news.carleton.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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