Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!warwick!maunz From: maunz@warwick.ac.uk (The Teenage Student WINJA Turbot) Newsgroups: comp.lang.c Subject: Re: Seven Original Sins of K&R (Long) Summary: Whoops! Message-ID: <1990Sep27.074302.26741@warwick.ac.uk> Date: 27 Sep 90 07:43:02 GMT References: <1990Sep26.163927.26084@dg-rtp.dg.com> <1990Sep26.193626.721@phri.nyu.edu> <1990Sep27.073730.26575@warwick.ac.uk> Sender: news@warwick.ac.uk (Network news) Organization: Computing Services, Warwick University, UK Lines: 31 In article <1990Sep27.073730.26575@warwick.ac.uk> maunz@warwick.ac.uk (The Teenage Student WINJA Turbot) writes: >In article <1990Sep26.193626.721@phri.nyu.edu> roy@phri.nyu.edu (Roy Smith) writes: >> >>What about this for a portable way to define NULL: >> >>#define NULL (""[1]) >> >>would that work? > > B L E U G H ! ! > >This is a joke, right? >("") is a null-terminated empty string, no? >Functionally equivalent to a char pointer which refers to an ASCII NUL or >char (0), no? >(""[1]) is probably a char pointer to garbage, no? Well that proves I'm stupid. I meant (""[1]) is probably a garbage char, honest, your honour! >Either this is a joke, or I have missed the point. >Either way I'm stupid. >I must agree with the poster/author of the 'original sins' about NULL though. >It would be nice if NULL had been made unnecessary by a standardised keyword >such as 'nullpointer' or something. But nobody could have expected K & R to >have crystal balls. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \ \/ /. \ JANET maunz@uk.ac.warwick.cu / "As the people here grow \/\/ I N J A \ (K R Turner) / colder..." -- Kate Bush \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/