Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!topaz.rutgers.edu!ron
From: ron@topaz.rutgers.edu (Ron Natalie)
Newsgroups: comp.lang.c
Subject: Re: NULL, zero, and readable code
Message-ID: <13518@topaz.rutgers.edu>
Date: Fri, 24-Jul-87 18:13:23 EDT
Article-I.D.: topaz.13518
Posted: Fri Jul 24 18:13:23 1987
Date-Received: Sat, 25-Jul-87 15:39:40 EDT
References: <8170@brl-adm.ARPA> <44200004@uicsrd> <6107@brl-smoke.ARPA> <802@cpocd2.UUCP> <24149@sun.uucp>
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 16

> No, it CANNOT mean that!  The test
>	if (p)
> tests whether "p" is not equal to the zero *of the type that "p" is*!
>  is equivalent to
>	if (p != (typeof p)0)

Of course which is precisely equivelent to

	if( p != 0)

for ANY type of p.  You can work through the "usual" arithmetic
conversions and the special case of integer constant zero versus
pointers and prove that this is true.  Hence for any of the relational
or equality operator one never need type cast zero.

-Ron