www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/03/02:42:02

Date: Thu, 3 Sep 1998 09:37:25 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Arthur <arfa AT clara DOT net>
cc: DJGPP Mailing List <djgpp AT delorie DOT com>,
James Dominy <jdominy AT saturn DOT cs DOT unp DOT ac DOT za>
Subject: RE: Strange results from printf()
In-Reply-To: <000001bdd6bd$3c31c6a0$f14e08c3@arfa>
Message-ID: <Pine.SUN.3.91.980903093653.6220F-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019