delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/09/13:53:18

To: times9 AT clark DOT net
Cc: sbcinf AT mbox DOT vol DOT it, djgpp AT delorie DOT com
Subject: Re: Strange behaviour...
Message-ID: <19970309.133243.7495.0.fwec@juno.com>
References: <Pine DOT GSO DOT 3 DOT 95 DOT 970308170427 DOT 860C-100000 AT explorer2 DOT clark DOT net>
From: fwec AT juno DOT com (Mark T Logan)
Date: Sun, 09 Mar 1997 13:34:44 EST

On Sat, 8 Mar 1997 17:05:13 -0500 (EST) Guess <times9 AT clark DOT net> writes:
>-> ....
>-> printf("\nHello World");
>-> printf("\nSomething else...");
>-> clrscr();
>-> .....
>-> Then, it writes "Hello World", it clear the screen and, then, write
>-> "Something else". Why? (I compiled the from RHide).
>I think it's cause it's not flushing the output buffer.
>printf("\nsomething else...\n");
>clrscr();

This is exactly what is happening.  I recommend you use cprintf().
It has the same function prototype, so use it as you would printf().
However, it is not buffered, so anything you print will be printed right
away.


||                                         Fwec AT juno DOT com
||
|| "Why can they make a potato chip in one second, but it takes us months
to
||   develop software?" - Dilbert's Boss
||

- Raw text -


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