Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!hal!ncoast!nc386!jeffl From: jeffl@nc386.uucp (Jeff Leyser) Newsgroups: comp.lang.c Subject: Re: use of if (!cptr) and if (cptr), where cptr is a * Message-ID: <1989Jul24.194646.3012@nc386.uucp> Date: 24 Jul 89 19:46:46 GMT References: <10099@mpx2.mpx.com> <93@microsoft.UUCP> <10100@mpx2.mpx.com> <10562@smoke.BRL.MIL> Reply-To: jeffl@nc386.UUCP (Jeff Leyser) Organization: North Coast Computer Resources Lines: 17 In post <10562@smoke.BRL.MIL>, gwyn@brl.arpa (Doug Gwyn) says: !In article <10100@mpx2.mpx.com> erik@mpx2.mpx.com (Erik Murrey) writes: !>Now, what happens with: !>if (cptr == 0) ? Does the compiler cast the cptr to an int, and loose !>the descriptor? (And tell is that it is null?) ! !We've already explained this, but here it is again: Just because you !see "0" in the source code does not mean that it acts an integer constant. OK, this may be meaningless, but out of curiosity is: if (cptr == (int) 0) illegal C, or simply compleat garbage? -- Jeff Leyser ...!uunet!hal!ncoast!nc386!jeffl