Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!clutx.BITNET!l40a From: l40a@clutx.BITNET (DeCorte Michael R) Newsgroups: net.micro.atari16 Subject: (none) Message-ID: <8610162302.AA26640@clutx.CLARKSON.EDU> Date: Thu, 16-Oct-86 19:02:18 EDT Article-I.D.: clutx.8610162302.AA26640 Posted: Thu Oct 16 19:02:18 1986 Date-Received: Fri, 17-Oct-86 03:56:11 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 24 The complaint was the ?Megamax C? had problems with the following code unsigned x; while ((x=getchar) != EOF) { ... } the complaint was the it went into an infinite loop. while if x was just an int everything was fine. He gave an idea that it may have had to do with the sign extending of char to int. well the problem acctully is I believe (I don't have or use magamax c so this is an educated guess) if you look in STDIO.H you will see that EOF is declared to be -1. some c systems use -1 others use 0 i believe. well the whole point is that -1 is legal and SOMEWHERE in KR it says so you can have the fun looking for the little blurb. I seem to remember it being in the second chapter and never did see it in the definition if you really want to find it. Michael DeCorte fi46@clutx l40a@clutx