Set type

Norman Diamond ndiamond at watdaisy.UUCP
Thu Feb 21 07:50:42 AEST 1985


> Creating sets in C is easy.  To declare set element, use #define:
> 
> 	#define RED 01
> 	#define BLUE 02
> 	#define GREEN 04
> 
> C has a union operator ("|"), an intersection operator ("&"), and even
> a set difference operator ("&~").  Of course, this approach limits you
> to sets which contain no more elements than are contained in an integer,
> but this limitation also tends to apply to PASCAL sets.
> 				Kenneth Almquist

That limitation does not apply to most PASCAL sets.  The vast majority of
PASCAL compilers allow sets large enough to support SET OF CHAR, but their
integers are not >= 127 bits in size.
-- 

   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy at waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet at csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."



More information about the Comp.lang.c mailing list