delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/31/05:27:37

Date: Tue, 31 Mar 1998 13:27:34 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Geoff Schoenbaum, MD, PhD" <schoenbg AT jhu DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: printf
In-Reply-To: <351FB59F.3AE29BF9@jhu.edu>
Message-ID: <Pine.SUN.3.91.980331132527.24124B-100000@is>
MIME-Version: 1.0

On Mon, 30 Mar 1998, Geoff Schoenbaum, MD, PhD wrote:

> In porting my c++ code from a ms compiler to djgpp I've discovered that
> my printf statements no longer appear on the screen until a carriage
> return is executed using "\n"

This is a FAQ.  See section 9.4 of the DJGPP FAQ list.

> - does anyone know why this happens in djgpp

Because stdout is line-buffered.

> or how to work around it?

Use "fflush (stdout);" if you want the output to be delivered without a 
newline.  Other solutions are discussed in the FAQ.

- Raw text -


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