Definition of boolean

K.LAUX rkl1 at hound.UUCP
Sat Feb 11 04:29:44 AEST 1989


	I have found the following to be helpful with what I call 'Logical'
states:

#define	RESET	-1		/* this is actually Tri-stated */
#define	UNSET	0
#define	SET	1

short	flag	= UNSET;

	...

	if (flag == UNSET) {	/* or == SET or == RESET */
		...
	}

	and so on...

--rkl



More information about the Comp.lang.c mailing list