Zero/nil/NULL/NUL/0/...

Noam Mendelson c60b-1eq at e260-1g.berkeley.edu
Sun Apr 21 05:14:04 AEST 1991


In article <GNAT.91Apr20183721 at kauri.kauri.vuw.ac.nz> gnat at kauri.vuw.ac.nz (Nathan Torkington) writes:
>I have read the FAQ and this doesn't seem to be what I'm after.  What I
>am looking for is an explicit list of things which 0 (zero decimal, zero
>octal, zero hexadecimal, etc) stand for.  So far I have :
>  -> The number zero (in any base)
>  -> The unused pointer (in some machines)
      ^^^^^^^^^^^^^^^^^^
Unused pointers are not automatically initialized to NULL.

>  -> The null character (ASCII, etc)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On most but not all machines.

>  -> End of file (EOF)
      ^^^^^^^^^^^^^^^^^
No, EOF is implementation-dependent but is usually == -1.

>  -> Not true (FALSE)

If you look through your's machines header files, you'll find quite a lot
of things which are #def'ed to zero.  So what?

-- 
+==========================================================================+
| Noam Mendelson   ..!ucbvax!web!c60b-1eq       | "I haven't lost my mind, |
| c60b-1eq at web.Berkeley.EDU                     |  it's backed up on tape  |
| University of California at Berkeley          |  somewhere."             |



More information about the Comp.lang.c mailing list