Re: Nybblepair
- From: Norbert Unterberg <nunterberg@xxxxxxxxxxxxxxxxx>
- Date: Sat, 01 Jul 2006 11:22:36 +0200
Bruno van Dooren schrieb:
this will make your bitfield 1 byte in size.
struct Nybblepair
{
unsigned char nybble2 : 4;
unsigned char nybble1 : 4;
};
Please note that even if this code works on your target, it is not portable code. The order and alignment in which a compiler assigns bits in a bit field is not specified (at least not in ANSI-C). I've seen at least three different implementations of this with several different compilers.
Norbert
.
- Prev by Date: Re: Arrays of structures?
- Next by Date: unexpected eof
- Previous by thread: Re: Arrays of structures?
- Next by thread: unexpected eof
- Index(es):