Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!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: Bleugh Message-ID: <1990Sep27.073730.26575@warwick.ac.uk> Date: 27 Sep 90 07:37:30 GMT References: <12780@sdcc6.ucsd.edu> <1990Sep26.163927.26084@dg-rtp.dg.com> <1990Sep26.193626.721@phri.nyu.edu> Sender: news@warwick.ac.uk (Network news) Organization: Computing Services, Warwick University, UK Lines: 27 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? 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 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/