home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!olivea!spool.mu.edu!agate!dog.ee.lbl.gov!network.ucsd.edu!mvb.saic.com!unogate!beckman.com!dn66!a_rubin
- From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin)
- Newsgroups: comp.lang.c
- Subject: Re: Sets in C
- Message-ID: <a_rubin.715993416@dn66>
- Date: 8 Sep 92 23:03:36 GMT
- References: <14390@goanna.cs.rmit.oz.au>
- Lines: 28
- Nntp-Posting-Host: dn66.dse.beckman.com
-
- In <14390@goanna.cs.rmit.oz.au> s913578@yallara.cs.rmit.OZ.AU (Fantom) writes:
-
- >I've been looking at implementing sets in C,
- >the method needs to be able to handle sets of more than 32 elements
- >so using bit fields won't work
-
- >Using arrays, etc would be fine, except that I want to be able to
- >put soemthing into the set for the duration of a function call only
-
- >eg
-
- >void foo()
- >{
- > settype S;
- > bar(set(elt1 elt2 elt3 S));
- >}
-
- >the set S should be unchanged by the call to bar
-
- (For fixed length sets), putting an array in a structure, with the
- proper "const" qualifier should handle argument passing properly, however
- you define the MemberQ "primative". Other than that, it's not clear what
- you want to do.
- --
- Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea
- 216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
- My opinions are my own, and do not represent those of my employer.
- My interaction with our news system is unstable; please mail anything important.
-