Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Denver Mods 4/2/84) 6/24/83; site drutx.UUCP Path: utzoo!watmath!clyde!burl!hou3c!hocda!houxm!hogpc!houxe!drutx!qwerty From: qwerty@drutx.UUCP Newsgroups: net.lang.c,net.unix-wizards Subject: Re: Do you use bit fields? ( K&R p. 137-8 ) (YES!) Message-ID: <1136@drutx.UUCP> Date: Thu, 20-Sep-84 09:53:38 EDT Article-I.D.: drutx.1136 Posted: Thu Sep 20 09:53:38 1984 Date-Received: Tue, 25-Sep-84 08:06:41 EDT References: <569@trwspp.UUCP> Organization: AT&T Information Systems Laboratories, Denver Lines: 7 We have used bit fields in dealing with hardware interfaces that are mapped into non-byte or non-word segments (ie. a couple of bits here, five bits there kind of things). They have turned out to be very useful. I have also used them as a form of compressed storage where I needed a lot of true/false states - you can get 16/32 to a word. There can be significant time wasted doing this if your underlying hardware does not support bit testing/manipulation.