delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/29/09:06:05

Date: Sun, 29 Jun 1997 16:01:24 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Justin Talbot <stevetalbot AT sandiegoca DOT ncr DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: printf() and shl Questions
In-Reply-To: <33B59082.F71@sandiegoca.ncr.com>
Message-ID: <Pine.SUN.3.91.970629155927.20395M-100000@is>
MIME-Version: 1.0

On Sat, 28 Jun 1997, Justin Talbot wrote:

> void main(void)
> {
> 	printf("Hello world");
> 	getch();
> }
> The computer waits for me to press a key, then prints "Hello world",
> then ends.  The compiler esentially switches the two function calls. 
> This also happens if I place two getch()s after the printf() statement,
> except it waits for two key presses before printing "Hello world."
> 
> Am I doing something very wrong?

Yes, you are doing something wrong: you don't look in the FAQ before 
posting.  This question is answered in section 9.4 of the DJGPP FAQ list 
(available as v2/faq210b.zip from the same place you get DJGPP).

- Raw text -


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