Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!texbell!wuarchive!zaphod.mps.ohio-state.edu!think!ames!sun-barr!decwrl!crltrx!decvax!mcnc!rti!sas!jwd From: jwd@sas.UUCP (John W. DeBoskey) Newsgroups: comp.lang.c Subject: Implementing sets in C Summary: How to implement Pascal Sets in C Message-ID: <1385@sas.UUCP> Date: 18 Dec 89 18:05:17 GMT Reply-To: jwd@sas.UUCP (John W. DeBoskey) Distribution: usa Organization: SAS Institute Inc, Cary NC Lines: 23 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