Xref: utzoo comp.lang.c++:4838 comp.lang.c:22313
Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!apple!sun-barr!newstop!texsun!texbell!sugar!ficc!peter
From: peter@ficc.uu.net (Peter da Silva)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: Time to standardize "true" and "false"
Message-ID: <6330@ficc.uu.net>
Date: 27 Sep 89 18:12:34 GMT
References: <13730@well.UUCP> <1989Sep22.073138.19684@lth.se> <12067@cit-vax.Caltech.Edu>
Organization: Xenix Support, FICC
Lines: 17

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@ficc.uu.net, +1 713 274 5180. Fun: peter@sugar.hackercorp.com. `-_-'
"That is not the Usenet tradition, but it's a solidly-entrenched            U
 delusion now." -- brian@ucsd.Edu (Brian Kantor)