TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: you
from: Jerry Coffin
date: 2003-09-11 07:46:22
subject: Re: Pointers

From: jcoffin{at}taeus.com
To: c_echo{at}yahoogroups.com

At 02:26 PM 9/10/2003 +0100, you wrote:

[ ... ]

>NULL will always be zero... until it's not. :-)

There is no reason to believe that the committee will redefine NULL to mean
something other than zero.

>Seriously, there maybe an architecture some day that addresses memory in
>such a day where 0 is a preferrable heap address, so NULL would need to be
>defined as -1 or some other illegal heap address.
>
>So, when testing pointers, don't use boolean tests, always test for
>==/!=NULL.

Nonsense -- this gains nothing in terms of future-proofing your
code.  There's just as much chance that the committee will decide to change
the definition of  "==" or "!=" as there is that
they'll change the
definition of NULL.
         Later,
         Jerry.

--- SoupGate-Win32 v1.05
* Origin: jcoffin{at}taeus.com (2:292/516.666)
SEEN-BY: 633/267 270
@PATH: 292/516 854 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.