Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!pacbell!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: use of if (!cptr) and if (cptr), where cptr is a * Message-ID: <9042@chinet.chi.il.us> Date: 22 Jul 89 20:02:13 GMT References: <10099@mpx2.mpx.com> <93@microsoft.UUCP> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 15 In article <10103@mpx2.mpx.com> erik@mpx2.mpx.com (Erik Murrey) writes: >while (myptr= my_func(), myptr->x != myptr->y) { > ... >} >I would kinda like to see that one in your style... I'd use: while (myptr = my_func() && myptr->x != myptr->y) { } which would detect a null pointer returned by my_func() as well as providing a guaranteed order of evaluation. Les Mikesell