Date: Thu, 3 Sep 1998 09:37:25 +0300 (IDT) From: Eli Zaretskii To: Arthur cc: DJGPP Mailing List , James Dominy Subject: RE: Strange results from printf() In-Reply-To: <000001bdd6bd$3c31c6a0$f14e08c3@arfa> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 2 Sep 1998, Arthur wrote: > > I'm calling printf() with two arguments like so : > > > > printf("SoundBlaster DSP version %i.%i",sb_dsp_major,sb_dsp_minor); > > > DJGPP has a 'feature' not occuring in several other compilers, where the > stdout is buffered. Put a \n at the end of the line and it should print when > the statement is executed, not when the buffer is next flushed. If the two numbers are indeed printed with a single call to `printf', like the snippet above shows, then the buffering cannot ever do anything like that, since it cannot reorder printed output. The effects of buffering you describe can only delay output, but not reorder its parts.