POV-Ray : Newsgroups : povray.off-topic : Quick C language-lawyer question... : Re: Quick C language-lawyer question... Server Time
5 Sep 2024 17:17:07 EDT (-0400)
  Re: Quick C language-lawyer question...  
From: clipka
Date: 30 Jul 2009 22:40:01
Message: <web.4a7258de5e1da091f31190d20@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> People often mistakenly argue that C++ guarantees the bit pattern is
> zero because you now write { char* x = 0; } instead of { char* x = NULL; }

BTW, those are perfectly identical according to the C99 spec: NULL *is* either
defined as the numeric literal 0, or the very same cast to void*.

People forget though that char* x = 0 actually involves an implicit typecast -
just like they forget (or never learn in the first place) that a typecast in C
does *not* necessarily preserve the binary representation...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.