C typedef deficiency

kurt at fluke.UUCP kurt at fluke.UUCP
Mon Jun 27 05:40:49 AEST 1983


The thing about the members of an enumerated type is that they are LITERAL
CONSTANTS.  Wanting to use a particular identifier to denote a member of
more than one enumeration should be viewed in the same way as wanting to use
a particular numeric literal (like 1 or 16) to denote more than one value.
Just because identifiers used as members of an enumeration are spelled
differently than literal numeric constants does not mean they are
semantically any different.

For extended discussion of this topic try:

"Enumerations in Pascal, Ada, and Beyond",Moffat,
SIGPLAN Notices(16)2 pp 77-82, Feb 1981

"Another Look at Enumerated Types",Harland & Gunn,
SIGPLAN Notices(17)7 pp 62-71, July 1981

Kurt Guntheroth
Digital Service Products Software
John Fluke Mfg. Co., Inc.



More information about the Comp.lang.c mailing list