pointers, tests, casts
Guy Harris
guy at auspex.UUCP
Fri Dec 2 19:02:55 AEST 1988
>Otherwise, there are are implementations, those defining NULL as
>(char *)0, which will give an error on the latter statement.
Great! That means that if I get an error, I get to throw rotten eggs at
the implementor. It's a good test to see who understood what they were
doing when they implemented C....
If NULL is properly defined as specified by the dpANS, namely as 0 or
"(void *)0",
if (ptr == 0)
and
if (ptr == NULL)
are equivalent.
More information about the Comp.lang.c
mailing list