🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #788

Bug in GCC / OS 2 ??

#788
From: rb532
Date: Thu, 13 Aug 1992 09:49
33 lines
1251 bytes
Hi.

I have 2 problem.s.

The first is one bug of gcc (I think)
I wrote a program like this:

include <stdio>;

main()
{char c

  printf("begin of program");
  do { c = getchar ();
	printf("%d",c)}
   while (c != "X");
  printf("End");
}

(perhaps ther are some syntax Errors now, but this doesn't matter)
I compile this program with GCC 2.1.
The result is an executable file.
I run it, and it asks for input, until I press X, and then prints 
"begin of program", then prints the digits, and then prints the "end"
why is this disorder ?

The second is that the getch() is not in the library (I get an Error 
when I compile.

Is there an updatet lib for gcc 2.1, or how can I use the one from 
OS2 devlopment kit.

Thank you
Technical Details
Message-ID: <1992Aug13.094911.49327@news.th-darmstadt.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!rbhp17.rbg.informatik.th-darmstadt.de!rb532

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!rbhp17.rbg.informatik.th-darmstadt.de!rb532
From: rb532@rbhp17.rbg.informatik.th-darmstadt.de ()
Subject: Bug in GCC / OS 2 ??
Sender: news@news.th-darmstadt.de (The Usenet-News System)
Message-ID: <1992Aug13.094911.49327@news.th-darmstadt.de>
Date: Thu, 13 Aug 1992 09:49:11 GMT
Nntp-Posting-Host: rbhp17.rbg.informatik.th-darmstadt.de
Organization: TH Darmstadt
Keywords: GCC
Lines: 33