[comp.lang.c] Implementing sets in C

jwd@sas.UUCP (John W. DeBoskey) (12/19/89)

Hello All,

   I've tried and painfully failed to implement a GOOD efficient 
method of the Pascal Sets in C. What I'd like to do is something
of the form:

       do {
          ch = process_string(somestring,someoffset,etc);
       while (ch IN('a'..'z','*'));

   I know I can do this with a series of OR operators, but there
must be an easier way to set this up as a pair of macros such as
IN() & NOTIN(), where the SETS passed in could be bit arrays.
Unfortunately, I've run out of ideas.

   If you have any ideas, I'd really appreciate hearing from
you. Please repsond to {backbone}!mcnc.mcnc.org!baggins!jwd
if you could. I'll post any final up & running code to do
this (if I ever can). Thanks Alot!!
                                      John W De Boskey

jwd@sas.UUCP     (w) jwd%sas@rti.rti.org
jwd@baggins.UUCP (h) jwd%baggins@mcnc.mcnc.org