Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!ucsd!ames!eos!data.nas.nasa.gov!mustang!nntp-server.caltech.edu!seismo.gps.caltech.edu!bruce From: bruce@seismo.gps.caltech.edu (Bruce Worden) Newsgroups: comp.lang.c Subject: Re: more that 32 flag array testing Keywords: boolean,testing,bits Message-ID: <1990Oct9.175837.4582@nntp-server.caltech.edu> Date: 9 Oct 90 17:58:37 GMT References: <1990Oct8.165154.26747@vitro.uucp> Sender: bruce@seismo.gps.caltech.edu (Bruce Worden) Organization: California Institute of Technology, CA Lines: 16 Nntp-Posting-Host: sis.gps.caltech.edu In article <1990Oct8.165154.26747@vitro.uucp> fsb@vitro.uucp (Steve Brailsford) writes: > [ looking for a way to set and test boolean flags ] I don't know what you consider to be too computationally intensive, but you might want to look at the way the macros that support the "select()" function provide the exact (almost) functionality you are looking for. Four macros (with some supporting code) are provided: FD_SET, FD_CLR, FD_ISSET, and FD_ZERO. It should be a simple matter to modify them to work for any sized string of bits. They are defined in . Good luck. (Note, the select() function itself is of no interest here, just the macros that support it. If you don't have these macros, and you send my a working e-mail address, I'll send you some non-copyright-infringing copies.) -------------------------------------------------------------------------- C. Bruce Worden bruce@seismo.gps.caltech.edu 252-21 Seismological Laboratory, Caltech, Pasadena, CA 91125