Please use NULL instead of 0 whenever you have a pointer!

Dan Sahlin dan at ttds.UUCP
Thu Feb 9 10:18:50 AEST 1984


Since I started this NULL vs. 0 discussion, I perhaps should repeat
my reasons for wanting people use to NULL instead of 0.

+ 0 is 16 bits on my machine.
+ NULL is declared as (char *)0 on my machine which makes 32 bits.
+ Programs that use 0 as pointer *crash*.
+ Programs that use NULL *don't crash*.
  The reasons (although very obvious) have been very well elaborated
  earlier so I will not repeat them.

While hoping to end this NULL discussion soon, I still have a question:
Is there really a C-compiler that makes a difference between a "(char *)0"
and "(int *)0" so a program can *crash* if it uses the wrong one?

	Dan Sahlin      ( ..mcvax!enea!ttds!dan )



More information about the Comp.unix.wizards mailing list