In C and embedded, one frequently uses enumerated constants where every value is a bit mask with exactly 1-bit set. (e.g. 0x0001, 0x0002, 0x0004, etc.) Is there a standard name for this type of bitmask? I've seen them referred to as flags, but more in passing than as a standard definition. I know it sounds snobbish, but "flags" doesn't really seem technical enough? Does anyone else have a good name for these? I can't imagine that noone has come up with one.
"Flags" is the accepted term. "Pass down a flag", "set this flag", etc.
"Flag" is used for these for decades now and is just fine. My old C64 already had a zero flag, carry flag, etc. See here for further info:
http://en.wikipedia.org/wiki/Flag_(computing%29
http://en.wikipedia.org/wiki/Status_register
I don't know exactly when this term was coined and by whom.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With