Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!rochester!cornell!batcomputer!braner From: braner@batcomputer.UUCP Newsgroups: comp.sys.atari.st Subject: Re: C compiler (Megamax 'bugs') Message-ID: <2139@batcomputer.tn.cornell.edu> Date: Tue, 27-Jan-87 23:50:55 EST Article-I.D.: batcompu.2139 Posted: Tue Jan 27 23:50:55 1987 Date-Received: Thu, 29-Jan-87 05:45:39 EST References: <8701231914.AA14914@ucbvax.Berkeley.EDU> <8400@watrose.UUCP> Reply-To: braner@batcomputer.UUCP (braner) Organization: Theory Center, Cornell University, Ithaca NY Lines: 19 [] Not that there aren't any bugs in the Megamax C compiler, but in this case the supposed bugs are NOT. Cnecin(), like all the BIOS, XBIOS and GEMDOS functions, returns a LONG value. In the case of keyboard input (Bconin(2), Cconin(), Cnecin()...) the lower word holds the ASCII code of the key, while the upper word holds the physical key code. For example, if 'q' is pressed, Cnecin() returns 00100071 hex. If you want to compare 'q' and Cnecin(), you should write: if ((int)Cnecin() == 'q')... My experiments on the modulus operator (%) and the post-increment (++) didn't show any problems. (If you have a SPECIFIC example, Jonathan, tell me.) - Moshe Braner