delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/20/18:42:55

Date: Fri, 20 Oct 2000 23:42:21 +0100 (MET)
From: Gisle Vanem <giva AT bgnett DOT no>
To: djgpp AT delorie DOT com
Subject: Re: printf
In-Reply-To: <Lw1I5.25758$h%1.156533@typhoon.jacksonville.mediaone.net>
Message-ID: <Pine.UW2.3.95.1001020233927.11289A-100000@bryggen.bgnett.no>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, 20 Oct 2000, Ed Collins wrote:

> Hello, there
> 
> When executing a C program in rhide under Windows98, I cannot get the printf
> function to work.  Nothing is printed to the User Screen.  Am I doing
> something wrong?  Here is a sample of the code.
> 
>     tablestruc[0].symbol = "APPLE";
>     tablestruc[0].symbval = 0X123;
>     tablestruc[0].symbinfo = 17;
> 
>     printf("%s, %x, %d",
> tablestruc[0].symbol,tablestruc[0].symbval,tablestruc[0].symbinfo);
> 
> 
> I would certainly appreciate anyone's comments.

djgpp's printf uses a line-buffered mechanism for better performance.
I.e. nothing is actually printed until a newline ('\n') is encountered
in the output stream. Use "fprintf (stderr,.." or call "fflush(stdout)"
to force a immediate flush of the stream.

Gisle V.

- Raw text -


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