Boolean Operators Slighted in C

aglew at ccvaxa.UUCP aglew at ccvaxa.UUCP
Fri May 23 00:27:00 AEST 1986


~> Boolean data type in C

I say `typedef unsigned char bool'...

Instead of using macros like lxor, I do
#define boolval(bv) ((bv)!=0)
so I can get away with saying boolval(XXX) ^ boolval(YYY) and the like.
Doesn't help with waning to be able to do BBBBB &&= CCCCC;

"Equal rights for Booleans!" has been my cry for a while - but I meant it
with respect to computer architectures, not C. After all, C can't be expected
to be better than present day architectures - C is just structured assembly
language. :-). On second though, :-(.

Andy "Krazy" Glew. Gould CSD-Urbana.    USEnet:  ihnp4!uiucdcs!ccvaxa!aglew
1101 E. University, Urbana, IL 61801    ARPAnet: aglew at gswd-vms



More information about the Comp.lang.c mailing list