Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site reed.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!tektronix!reed!maclab From: maclab@reed.UUCP (Mac DLab) Newsgroups: net.micro.mac Subject: Re: Re: Megamax bug? Message-ID: <3645@reed.UUCP> Date: Fri, 13-Jun-86 15:39:53 EDT Article-I.D.: reed.3645 Posted: Fri Jun 13 15:39:53 1986 Date-Received: Tue, 17-Jun-86 09:21:18 EDT References: <1023@k.cs.cmu.edu> <219@analog.UUCP> Distribution: net Organization: Reed College, Portland, Oregon Lines: 21 > > Keywords: > > > > > > I'm working in Megamax C, and I noticed a problem while I was in the > > debugger. It comes from these statements: > > > > for (i = ntables; i--; ) > > if (i == -1) > > > > I would expect this to get the value of i, decrement the stored value, > > and then exit or execute the statement. Rather, it tests the value > > before it decrements, and the loop exits with i = 0. Is this a bug > > in the code generation, or is C supposed to do this? > > > > Greg > > It's not a MegaMax bug, it's a Greg bug (:-). Oops! Guess Greg just can't get Rascal out of his head! Scott G.