Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.co.jp (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: Abandon NULL for (0) Message-ID: <10898@riks.csl.sony.co.jp> Date: 5 Oct 89 04:57:41 GMT References: <14718@bfmny0.UU.NET> <8241@goofy.megatest.UUCP> <10839@dasys1.UUCP> Reply-To: diamond@riks. (Norman Diamond) Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 28 In article <10839@dasys1.UUCP> jpr@dasys1.UUCP (Jean-Pierre Radley) writes: >I have found my code to more readable if I use these two defines: > >#define NULLC (char *)0 This one doesn't look so readable to me. NULLC very clearly means the character that comes at the end of a string. Why not try: #define NULLC '\0' #define NULLS (char *) 0 (This gives NULLC the exact same definition that NULL should have, but so what. The proper use of NULLC helps provide self-documenting code.) >#define NULLF (FILE *)0 Mixed feelings about this one. Its name is reminiscent of /dev/null (and similar pseudo-files on other operating systems). There is a difference between a file opened to /dev/null and an unopened file. -- Norman Diamond, Sony Corp. (diamond%ws.sony.junet@uunet.uu.net seems to work) The above opinions are inherited by your machine's init process (pid 1), after being disowned and orphaned. However, if you see this at Waterloo or Anterior, then their administrators must have approved of these opinions.