delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/14/17:07:30

From: "Chris La Mantia" <lamantia AT gte DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [Q] Bug with printf?
Date: 13 Aug 1997 15:38:31 GMT
Organization: gte.net
Lines: 33
Message-ID: <5sskdn$jih$1@gte2.gte.net>
References: <5ss8me$25j$1 AT kurica DOT wt DOT com DOT au>
NNTP-Posting-Host: 1cust49.tnt1.columbia.mo.da.uu.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Robert Debeljakovic <rdebelj AT wt DOT com DOT au> wrote in article
<5ss8me$25j$1 AT kurica DOT wt DOT com DOT au>...
> 
> Hi all,
> I just started writing some test programs and I came across something...
> If you use printf without a newline character in the string, it does
print the 
> test to the screen....
> 
> eg:
> printf("hello\n");    gives me
> hello
> 
> where as printf("hello");     gives me 
> [nothing]
> 
> Any solutions?
> 
> I apoligise if this has been discussed over & over, I am new to this
group as 
> of today... 

printf() is buffered output; the buffer isn't flushed until a newline is
sent or it is fflush()ed.

--Chris

---------------------------------------------------------------------------
Chris La Mantia / lamantia AT gte DOT net
Current Project: Infinite Worlds, an RPG with a dynamic world
http://home1.gte.net/lamantia/infinite
NO UNSOLICITED COMMERCIAL E-MAIL ACCEPTED

- Raw text -


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