[comp.lang.c] Readable code -- #define ONE 1

minow@decvax.UUCP (Martin Minow) (07/16/87)

In article <8291@brl-adm.ARPA> gea@Iago.Caltech.EDU (Gary Ansok) writes:
> Also, it can lead to nonsense like
>`#define ONE 1' from people who don't understand.

This *specific definition* is useful if you have to work with a poor
printer that doesn't distinguish between 1 and l.  In general, of
course, the constant should be given a descriptive definition:
	#define EXIT_SUCCESS	0
	#define EXIT_ERROR	1
	...
	exit(EXIT_ERROR);

Martin Minow
decvax!minow