Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!news-peer.gip.net!news.gsl.net!gip.net!feeder.qis.net!feed2.news.rcn.net!rcn!news.voicenet.com!nntp.upenn.edu!news.myxa.com!uunet!nyc.uu.net!world!buzzard
From: buzzard@world.std.com (Sean T Barrett)
Subject: Re: [Inform] Quick reference summary
Message-ID: <G70Fs0.Kr3@world.std.com>
Date: Thu, 11 Jan 2001 18:09:36 GMT
References: <3A5B6FE5.DEDB1D25@tesco.net> <93i6j3$hlr$1@news.panix.com> <93jr40$aom4a$1@ID-62041.news.dfncis.de> <93kplc$94g$3@news.panix.com>
Organization: The World Public Access UNIX, Brookline, MA
Lines: 21
Xref: news.duke.edu rec.arts.int-fiction:82119

Andrew Plotkin wrote:
>C programmers are used to NULL being zero, and I think it's worth a
>reminder that in Inform it's not.

Except of course that in C NULL isn't 0 at all; and if you're a good
C programmer and always use NULL, you'd never need to know the
rule that a literal 0 in a pointer context is how you represent
NULL to the compiler. (The other way NULL "is" 0 is that a NULL
pointer is false in a logical context, and all other pointers are
true, but even there a lot of people argue that it's better style
to explicitly compare to NULL.)

On systems that don't represent NULL pointers as 0 internally:

    casts of non-literal 0's may not produce NULL pointers
    casts of NULL pointers to integers may not produce 0
    uninitialized pointer global variables may have non-NULL initial values

</languagelawyer>

SeanB
