home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!euas62c36!euamts
- From: euamts@eua.ericsson.se (Mats Henricson)
- Subject: Re: Is (p) instead of (p!=NULL) portable?
- Message-ID: <1993Jan25.173241.25404@eua.ericsson.se>
- Sender: news@eua.ericsson.se
- Nntp-Posting-Host: euas62c36.eua.ericsson.se
- Reply-To: euamts@eua.ericsson.se
- Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
- References: <1993Jan25.125627.29030@ugle.unit.no>
- Date: Mon, 25 Jan 1993 17:32:41 GMT
- Lines: 18
-
- In article 29030@ugle.unit.no, robert@alkymi.unit.no (Robert Schmidt) writes:
- >
- >In PC C's, the NULL pointer is defined with a bit pattern of all zero's,
- >and the constructs
- > if (p)
- >and
- > if (!p)
- >checks for NULL and non-NULL respectively. Is this portable to *all*
- >platforms?
-
- There was a long discussion on this some months ago, and if I remember
- the outcome correct, the answer is "YES".
-
- Mats Henricson
- Ellemtel Telecom Systems Labs
- Stockholm
- Sweden
-
-