NULL problems
Wayne A. Christopher
faustus at ucbcad.UUCP
Wed May 15 06:19:28 AEST 1985
Can anybody think of any problems with making "NULL" a part of the C
language, specifically as a pointer to anything with a value of 0? As
has been pointed out, it is a pain to have to remember to cast it all
the time, and I tend to think of NULL as a pointer, not an integer.
Perhaps then if anybody wanted to change NULL to be some other value,
for instance if he wanted *NULL to be invalid, then the compiler could
be changed to make NULL behave like 0 in things like "while (p)" which
should mean "while (p != NULL)"...
Wayne
More information about the Comp.unix.wizards
mailing list