Time to standardize "true" and "false"

Peter da Silva peter at ficc.uu.net
Thu Sep 28 04:12:34 AEST 1989


Rather than add a boolean type, make bitfeilds more like first-class objects:

typedef int boolean:1;

boolean x;	/* allocates, say, 1 byte */

boolean y, z;	/* allocates a byte each, so you can take an addr */

{
	register boolean a,b,c;	/* Allocates 1 byte for all: no addr needed */
	struct foo { boolean bar, baz; }; /* sizeof(foo) == 1 */
...
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter at ficc.uu.net, +1 713 274 5180. Fun: peter at sugar.hackercorp.com. `-_-'
"That is not the Usenet tradition, but it's a solidly-entrenched            U
 delusion now." -- brian at ucsd.Edu (Brian Kantor)



More information about the Comp.lang.c mailing list