Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/23/84; site ucbcad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!ucbcad!faustus From: faustus@ucbcad.UUCP (Wayne A. Christopher) Newsgroups: net.lang.c Subject: Re: Re: more about programming style Message-ID: <78@ucbcad.UUCP> Date: Fri, 19-Jul-85 17:13:35 EDT Article-I.D.: ucbcad.78 Posted: Fri Jul 19 17:13:35 1985 Date-Received: Sat, 20-Jul-85 12:21:46 EDT References: <11457@brl-tgr.ARPA> <68@ucbcad.UUCP> <487@mmintl.UUCP> Organization: UC Berkeley CAD Group, Berkeley, CA Lines: 22 > > if you write > > > > while (p->duck) > > p++; > > > >instead of > > > > while (p++->duck) > > ; > > > > This will probably not be the only posting pointing out that your examples > are different. The first will leave p pointing to the first structure for > which duck is zero; the second leaves it pointing one past it. I didn't say they were the same, I was just trying to make the point that the compiler might use a better strategy for compiling one than the other. So I was careless -- I would never do such a thing in an actual program, and if I did it wouldn't take long to discover and fix the mistake... Wayne