Xref: utzoo comp.arch:4909 comp.lang.c:10246 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!umd5!mimsy!aplcen!osiris!phil From: phil@osiris.UUCP (Philip Kos) Newsgroups: comp.arch,comp.lang.c Subject: Re: negative addresses Summary: null, not NULL Message-ID: <1607@osiris.UUCP> Date: 19 May 88 19:47:50 GMT References: <2393@uvacs.CS.VIRGINIA.EDU> <21541@amdcad.AMD.COM> <4086@gryphon.CTS.COM> Organization: Johns Hopkins Hospital Lines: 23 In article <4086@gryphon.CTS.COM>, sarima@gryphon.CTS.COM (Stan Friesen) writes: > In article <10001@tekecs.TEK.COM> andrew@frip.gwd.tek.com (Andrew Klossner) writes: > > There doesn't seem to be leeway > >to define pointer comparisons to be against some non-zero NULL value. > > Yes, but they ALSO require that comparing a NULL-pointer to zero > evaluate to true *whatever* the representation of the NULL-pointer.... Please be careful not to confuse null pointers with NULL pointers. Null pointers have a formal definition within the language, but NULL pointers don't really; NULL is just a convention and not part of the language spec. ("We write NULL instead of zero, however, to indicate more clearly that this is a special value for a pointer", K&R first edition, pp. 97-98; "The symbolic constant NULL is often used in place of zero, as a mnemonic to indicate more clearly that this is a special value for a pointer", K&R second edition, p. 102.) I've also seen NULL defined as (char *) 0, by the way... Phil Kos Information Systems ...!uunet!pyrdc!osiris!phil The Johns Hopkins Hospital Baltimore, MD