Zero/nil/NULL/NUL/0/... a clarification

Nathan Torkington gnat at kauri.vuw.ac.nz
Sun Apr 21 12:41:04 AEST 1991


I wasn't clear enough on some points and I was wrong on others.  My
request still stands :

>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)
	tmb at ai.mit.edu (Thomas M. Breuel) said quite rightly : Zero in
base 16 must be written 0x0 as 0 by itself is always read as decimal.  You
must give a suffix/prefix to show which base is meant.
>  -> The unused pointer (in some machines)
	I wasn't clear enough.  "Unused" meaning that you the programmer
have set it to NULL (0) to indicate that it doesn't point to meaningful
data; it is not being used to point to meaningful data.
>  -> The null character (ASCII, etc)
	NUL (bit pattern 00000000) is the ASCII symbol for bit pattern
00000000.  This is different from 'no character read' indications.
>  -> End of file (EOF)
	I was wrong.  This is not zero.
>  -> Not true (FALSE)
	At least I didn't get *this* wrong.

Nat.
--
Nathan Torkington                           Contracting to CSC,
Internet: gnat at kauri.vuw.ac.nz              Victoria University Of Wellington,
WetComms: +64 4 853 881 (post-chronos)      P.O. Box 600, New Zealand.
This is not an official communication of any part of Victoria University.

WIDDICOMBE (n.)  The sort of person who impersonates trimphones.
                 - "The Meaning Of Liff" by Douglas Adams and John Lloyd



More information about the Comp.lang.c mailing list