www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/16/03:52:04

Message-Id: <199811160855.RAA24582@inmac3.snu.ac.kr>
From: "Won-Seok Lee" <lws AT inmac3 DOT snu DOT ac DOT kr>
To: <djgpp AT delorie DOT com>
Subject: Question about the operation of printf()
Date: Mon, 16 Nov 1998 17:48:00 +0900
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

$)C
Dear D. J. Delorie:

Thank you for the development of DJGPP which get rid of
the 640kB barrier.

I have a question about the operation of DJGPP printf().
To show the problem I have been confronted with can
  be shown by the following example programs.

The example program is the following:

#include  <stdio.h>
#include  <conio.h>

void  main( void ) {
  printf( "a" ) ;
  getche( ) ;
}

If this program is compiled and made executable by
the tcc.exe of the Turbo C3.0 DOS version, the result
is the following:

a

and when I press a button (for example, b),
then the output is 

ab

and the program terminates.
This operation is quite as expected.

But, ...

if this program is compiled and made executable by
the gcc.exe of the DJGPP, the result is the following:

<no output>

and when I press a button (for example, b),
then the output is

ba

and the program terminates.
This operation discourages me a lot, since
I must re-write the program for gcc.exe to do
the same job on the monitor screen.

Please inform me how I can escape this situation.

Thank you.

Won-Seok Lee
(Researcher)
E-mail: lws AT inmac3 DOT snu DOT ac DOT kr
FAX: 82-2-888-3633

- Raw text -


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