On Tue, Feb 23, 2010 at 4:53 PM, Jimmy Johnson <boxer...@yahoo.com> wrote:
> --- In c-prog@yahoogroups.com, Paul Herring <pauljherr...@...> wrote:
>>
>>
>> > What should it be.  And I hope you don't say
>> >  p = 0;
>>
>> Why not? It means _exactly_ the same thing in most contexts in both C and 
>> C++.
>>
>
> Because I don't think of a pointer as a boolean, no matter the context.

Then you *really* need to rethink what NULL is. It is exactly *that*(a
boolean) in a pointer context. If it's NULL, it's invalid, if it's not
NULL, it's valid. It's a boolean for a pointer.

If NULL isn't the opposite of  what '1' happens to be the opposite of,
what exactly do you think it is?

I'd really like an answer from *you*, because in most of my (working -
i.e. writing code for a live business) code, I use 0 rather than NULL.

Why is 0 an unacceptable substitute to NULL, given what you've
learnt/been taught/what you've seen? I'd like the reasoning.
Honestly...

-- 
PJH

http://shabbleland.myminicity.com/env
http://www.chavgangs.com/register.php?referer=9375

Reply via email to