Date: Tue, 11 May 1999 08:44:19 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Alain Magloire cc: djgpp-workers AT delorie DOT com Subject: Re: Quirky getch() (fwd) In-Reply-To: <199905101750.NAA16951@mccoy2.ECE.McGill.CA> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 10 May 1999, Alain Magloire wrote: > printf ("hello world\n"); > printf ("Enter key: "); > getch(); > > The last printf() was not flush, I did not expect it to show. People generally expect the results be displayed in sequence. If I would to write such a fragment, I would add a call to fflush before getch, but too many newbies don't. Also, I believe that if I would need the "Enter key: " prompt to appear after getch returns, I would have switched their order in the source instead of relying on the output to be deferred.