home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19872 < prev    next >
Encoding:
Text File  |  1993-01-25  |  985 b   |  32 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!euas62c36!euamts
  3. From: euamts@eua.ericsson.se (Mats Henricson)
  4. Subject: Re: Is (p) instead of (p!=NULL) portable?
  5. Message-ID: <1993Jan25.173241.25404@eua.ericsson.se>
  6. Sender: news@eua.ericsson.se
  7. Nntp-Posting-Host: euas62c36.eua.ericsson.se
  8. Reply-To: euamts@eua.ericsson.se
  9. Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
  10. References: <1993Jan25.125627.29030@ugle.unit.no>
  11. Date: Mon, 25 Jan 1993 17:32:41 GMT
  12. Lines: 18
  13.  
  14. In article 29030@ugle.unit.no, robert@alkymi.unit.no (Robert Schmidt) writes:
  15. >
  16. >In PC C's, the NULL pointer is defined with a bit pattern of all zero's,
  17. >and the constructs 
  18. >      if (p)
  19. >and
  20. >      if (!p)
  21. >checks for NULL and non-NULL respectively.  Is this portable to *all*
  22. >platforms?
  23.  
  24. There was a long discussion on this some months ago, and if I remember
  25. the outcome correct, the answer is "YES".
  26.  
  27. Mats Henricson
  28. Ellemtel Telecom Systems Labs
  29. Stockholm
  30. Sweden
  31.  
  32.