Well, perhaps yes, perhaps no.  What I don't know is if it is
     actively illegal to assign 0 to an enumeration that doesn't
     contain 0 as a member.

It's not "illegal", but there's no way to do it in the language without using
an Unchecked_Conversion (or similar sorts of punning).  And if the
Unchecked_Conversion produced a result that did not correspond to the value
of an enumeration literal, the only non-erroneous use of that value is as the
operand of 'Valid.

Reply via email to