[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Don't use enumerations for bit masks. Use a collection of
#define
s instead. Use u
or ul
suffixes to force
the bit masks to be of type unsigned
or unsigned long
.
(Enumeration members are always of type int
.)
enum tag
should be used wherever reasonable for
storing a value from the enumeration, for documentary purposes, and
especially as a function parameter type.
Enumeration member names should be in all capitals.
prefix_CNT
. The value of this item is the number of items
in the enumeration, its count. Specify this value explicitly when
declaring an array with one element per member of the enumeration, in
order to facilitate compiler verification of the array's size.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |