Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!nmtsun!dwho From: dwho@nmtsun.nmt.edu (David Olix) Newsgroups: comp.lang.c Subject: Re: use of if (!cptr) and if (cptr) && a programming error Message-ID: <2990@nmtsun.nmt.edu> Date: 21 Jul 89 20:01:39 GMT References: <10099@mpx2.mpx.com> <93@microsoft.UUCP> <10100@mpx2.mpx.com> <10103@mpx2.mpx.com> <8468@batcomputer.tn.cornell.edu> <14582@dartvax.Dartmouth.EDU> Reply-To: dwho@nmtsun.nmt.edu (David Olix) Organization: New Mexico Tech, Socorro NM Lines: 17 [Skipping all the "In article..." stuff] >[Material everybody has seen n times deleted.] >I am kind of butting in [ :-) ], but how 'bout > while ( ( myptr = my_func() )->x != myptr->y ) > { > } >THAT WILL NOT WORK! [...] Actually, "Mastering C" by Craig Bolon, SYBEX Inc., p. 273 says that parenthesis operators have the HIGHEST priority, therefore what's inside (myptr = my_func()) would get evaluated first. Also, it specifies that grouping for the '!=' operator is from left to right. Now, the author of this book may have been wrong.... Anyone seen an "official" statement from K&R? --David Olix (dwho@nmtsun.nmt.edu)