|
 |
"Orchid XP v8" <voi### [at] dev null> wrote in message
news:4ae0be3d$1@news.povray.org...
> I mean, sure, it has support for twiddling bits and stuff. But you'd think
> if you were doing low-level work, you would have a way to explicitly say
> how many bits you want to use. Yet C provides no such facility.
Wouldn't bit fields do what you're describing? As in:
struct PackBits {
unsigned int field1:2;
unsigned int field2:1;
unsigned int field3:4;
unsigned int field4:1;
}
I can't recall if that's in K&R, but I'm sure it's at least ANSI C.
Post a reply to this message
|
 |