[fpc-pascal] Extending an enumeration

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Fri Dec 28 12:33:59 CET 2012


JC Chu wrote:
> It is not possible to extend an enumeration type.  If you are not
> willing to use separate sets to hold common and extended elements, you
> can use a generic (not parametric) set type, say SET OF 0..31, that
> can hold all possible elements, and define the possible elements as
> constants.

Yes, except that that loses type checking.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list