On Sat, 2 Jan 1999, James [on his mailserver] wrote:
> anyone see a problem with this? i'll just be accessing the flags thing
> like a regular struct.. i.e if (flags.file == 1) { fopen (...) } else {
> fgets (stdin) };
> i could use whole ints for each flag, but why waste an entire (sizeof
> (int)) when i am only setting things on or off, using bits seems more
> logical...
Using bitfields to save a few bytes could be false economy,
as more instructions may be required for accessing a bitfield.
(Read the assembly output to see if this is the case with for
the target.)
Unless you have a number of structures to process in a loop I
don't see much point.