Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!ucsd!nosc!crash!ncr-sd!se-sd!rns From: rns@se-sd.SanDiego.NCR.COM (Rick Schubert) Newsgroups: comp.lang.c Subject: Re: Seven Original Sins of K&R (Long) Message-ID: <3945@se-sd.SanDiego.NCR.COM> Date: 2 Oct 90 14:26:28 GMT References: <12780@sdcc6.ucsd.edu> <1990Sep26.163927.26084@dg-rtp.dg.com> <1990Sep26.193626.721@phri.nyu.edu> <1990Sep27.073730.26575@warwick.ac.uk> <1990Sep27.131329.26616@phri.nyu.edu> <1990Sep28.144753.23727@zoo.toronto.edu> Organization: NCR Corporation, Systems Engineering - San Diego Lines: 23 [I know I should probably let this go since this is a dead issue, but I couldn't resist improving on Henry's answer. I hope I'm not missing something, since I'm surprised he didn't also say what I'm going to.] In <1990Sep28.144753.23727@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: >In article <1990Sep27.131329.26616@phri.nyu.edu> roy@phri.nyu.edu (Roy Smith) writes: >>... I meant to >>write: >> >>#define NULL (""[0]) >Roy, apart from not being a compile-time value, which limits its use, >this is exactly and precisely equivalent to >#define NULL 0 Since (""[0]) is not a compile-time value (I assume that's the same thing as a constant expression), it is also not a null-pointer constant. It DOES have the value 0, but the only arithmetic expressions that are null pointers are those that are constant expressions evaluating to 0. -- Rick Schubert (rns@se-sd.sandiego.NCR.COM)