Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uicsrd!schouten From: schouten@uicsrd.UUCP Newsgroups: comp.lang.c Subject: Re: NULL, zero, and readable code Message-ID: <44200004@uicsrd> Date: Wed, 8-Jul-87 14:37:00 EDT Article-I.D.: uicsrd.44200004 Posted: Wed Jul 8 14:37:00 1987 Date-Received: Sun, 12-Jul-87 11:09:47 EDT References: <8170@brl-adm.ARPA> Lines: 37 Nf-ID: #R:brl-adm.ARPA:8170:uicsrd:44200004:000:1483 Nf-From: uicsrd.cs.uiuc.edu!schouten Jul 8 13:37:00 1987 In article <1219@ius2.cs.cmu.edu> edw@ius2.cs.cmu.edu (Eddie Wyatt) writes: -... use NULL instead of 0 because there are those implements of C -(which are wrongly implemented) that don't treat 0 the way they should. . . . /* Written 1:29 am Jul 6, 1987 by bdm-thad@Walker-EMH.arpa in uicsrd:comp.lang.c */ /* ---------- "NULL, zero, and readable code" ---------- */ Re: NULL vs. zero and readable code I think the problem here is the definition of NULL. NULL is not, repeat, NOT, equal to zero, at least the base ten zero. If I recall my high school math, zero is a number, the crossover between positive and nega- tive. NULL, on the other hand, is the absence of any number. . . . DISCLAIMER: I'm just a Poli Sci major. /* End of text from uicsrd:comp.lang.c */ I must have missed something, cuz I can't seem to find the root of this discussion, Sounds entertaining though. ("I'm just a Poli Sci major" is the most appropriate disclaimer I've heard) But I feel obligated to encourage the use of NULL over 0. Irregardless of style questions (or "theoretial" discussions), I have worked on systems where NULL was != 0, because 0 was a valid address. It's incredibly annoying to have to search for all occurrences of 0 that are intended as a NULL pointer value. Dale A. Schouten UUCP: {ihnp4,seismo,pur-ee,convex}!uiucdcs!uicsrd!schouten ARPANET: schouten%uicsrd@a.cs.uiuc.edu CSNET: schouten%uicsrd@uiuc.csnet BITNET: schouten@uicsrd.csrd.uiuc.edu