Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!munnari.oz.au!csc!ccadfa!usage!basser!nswitgould!fidogate From: karl_auer_%7801.801@fidogate.fido.oz (1) Newsgroups: comp.lang.c Subject: Re: Abandon NULL for (0) Message-ID: <15571@nswitgould.cs.uts.oz> Date: 27 Sep 89 12:00:00 GMT Sender: fido@nswitgould.cs.uts.oz Organization: A Fidonet node, gated through nswitgould.oz Lines: 20 Original to: karl@haddock.ima.isc.com In a message to All <22 Sep 89 15:42:26>, karl@haddock.ima.isc.com wrote: > In particular, if I were maintaining that code, I'd change the "(0)"'s > back to "NULL"'s as fast as I found them. There is another good reason not to use '(0)' - in some implementations of C, pointers can have different sizes, requiring that NULL be sometimes defined as (0), sometimes as (0L) - as with almost all 80n86 implementations! Having a #define called NULL allows the program cc (or equivalent) to pick the appropriate include files, or allows conditional #defines depending on memory model (the usual method). Besides, I prefer a meaningful word to a meaningless constant number any day! Regards, K. --- Qtach2 v1.04 U4 * Origin: Aust. QNX Users Group (+61-62-514589 9am-5pm AEST) (3:7801/801)