> This is still not an answer to the question I originally asked - do you
> see any way IN C to write code which has the relevant property of the
> class above (that is, that the FOOmode constants are not accessible
> except to authorized code) and which does not rely on free conversion
> between enumeration constants and integral types?

enum {
  TVQ_BAR_GRILL = (DATESTAMP % 10),
  TVQ_NEXT2,
  TVQ_NEXT3,
  TVQ_NEXT4
} TheValQuux;

It's evil, but it will keep programmers from hard-coding integer
constants anywhere.  The "constants" will need to be different every
day.

"Authorized code" can always offset by (DATESTAMP%10) if the intrinsic
values of the enums are important to it.

Reply via email to