Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c Subject: Re: Deleting linked lists. Message-ID: <1791@bbxsda.UUCP> Date: 28 Mar 91 14:58:25 GMT References: <2636@borg.cs.unc.edu> <548@bria> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Distribution: na Organization: Basis International, Albuquerque, NM Lines: 17 In article <548@bria> uunet!bria!mike writes: > while ( ptr != NULL ) { > >Personally, I think that the [not shown] `while' is not very nice; you should >explicitly test for NULL -- after all, a pointer is not an integer, >right? ...and neither is a '0' when compare to a pointer which is what is implied by 'while (ptr)'. The C compiler will assume a compare to a null pointer in such a case. -- Scott Amspoker | Touch the peripheral convex of every Basis International, Albuquerque, NM | kind, then various kinds of blaming (505) 345-5232 | sound can be sent forth. unmvax.cs.unm.edu!bbx!bbxsda!scott | - Instructions for a little box that | blurts out obscenities.