Path: utzoo!mnetor!uunet!husc6!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Why NULL is 0 - summary Message-ID: <789@cresswell.quintus.UUCP> Date: 21 Mar 88 08:40:20 GMT References: <800@zippy.eecs.umich.edu> <132@polygen.UUCP> Organization: Quintus Computer Systems, Mountain View, CA Lines: 17 Summary: one more reason This is painfully bad style, but I have often seen[*] code which did e.g. char x = NULL; What was intended, of course, was something like #define NUL '\0' /* ok for EBCDIC and ASCII both */ char x = NUL; but what was written was technically correct and had the intended effect. NULL is 0, not 0L, and not (sometype*)0. Just 0. I don't use plain NULL for anything, always #define NullFoo ((Foo*)0) ... #define NullBaz ((Baz*)0) [*] No it _wasn't_ my code!