🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2308

Re: references wanted

#2308
From: Stan Ryckman
Date: Sat, 16 Mar 1996 17:21
28 lines
1406 bytes
In article <4ian7m$h54@solutions.solon.com>,
Angelo John Mileto <runner!amileto@uunet.uu.net> wrote:
:In article <4i97jv$8hn@solutions.solon.com> ANH@KUHUB.CC.UKANS.EDU writes:
:>But here is one simple rule,  always use (Type*)0 and not null for null 
:>pointer check.  Show my a thousand standards that say I don't need 
:>to do that, I would still use the construct.
:>
:>Anh
:
:I'll byte, what exactly does (Type*)0 do that NULL doesn't do and why will
:it always work whereas NULL may or may not?

Actually....

	printf( "%p\n", (void*) NULL); /* OK */
	printf( "%p\n", (Type*) NULL); /* not OK */
	printf( "%p\n",  NULL);        /* not OK */

(Same if 0 is used rather than NULL in any of these.)

(See 4.9.6.1.)

Cheers,
Stan.
--
Stan Ryckman  (stanr@tiac.net)
  (Apologies for non-responses or late responses to some posts;
  .newsrc was trashed and I'm trying to get it back to where it was.)
Technical Details
Message-ID: <4ietaq$b0n@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4i6fn8$p0g@solutions.solon.com> <4i97jv$8hn@solutions.solon.com> <4ian7m$h54@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: stanr@tiac.net (Stan Ryckman)
Newsgroups: comp.lang.c.moderated
Subject: Re: references wanted
Date: 16 Mar 1996 11:21:30 -0600
Organization: Amber & Sneakers Fan Club
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4ietaq$b0n@solutions.solon.com>
References: <4i6fn8$p0g@solutions.solon.com> <4i97jv$8hn@solutions.solon.com> <4ian7m$h54@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com