lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Andrew Gierth once stated:
> >>>>> "Ranier" == Ranier Vilela <ranier.vf@gmail.com> writes:
> 
>  Ranier> 5. fgets returns char * pointer which needs to be compared to
>  Ranier> NULL, not 0.
> 
> 0 is a valid way to say "the null pointer".

  I would agree with Ranier with replacing the 0 with NULL to clarify the
intent, and to make it stand out, but I can understand why the Lua team
choose to use 0 in this instance (because saying "XXXXXXXX to C++
programmers", as I am wont to do, may be a bit extreme).

  -spc