Path: utzoo!attcan!uunet!mailrus!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali!milton!uw-beaver!sumax!thebes!polari!6sigma2 From: 6sigma2@polari.UUCP (Brian Matthews) Newsgroups: comp.lang.c Subject: Re: Enumerated types... what's the point? Message-ID: <1425@polari.UUCP> Date: 24 Mar 90 00:27:37 GMT References: <1990Mar22.053148.10351@ncsuvx.ncsu.edu> <1990Mar22.164943.10459@utzoo.uucp> Reply-To: blm@6sceng.UUCP (Brian Matthews) Organization: Seattle Online Public Unix (206) 328-4944 Lines: 14 In article <1990Mar22.164943.10459@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: |Enumerated types were basically a kludge. X3J11 seriously debated leaving |them out entirely. Arguments about not breaking existing code, etc, led |to them being left in, but as a flavor of integer rather than as real live |independent types. That's all they ever were in C. For some C compilers, your last sentence isn't true. pcc2's enums weren't interchangable with integers, although they weren't full separate types with separate name spaces and such either. ANSI enums, on the other hand, are little more than fancy #defines (although you can: a - insert new ones in the middle without renumbering the others by hand and b - have the compiler tell you how many there are.) -- Brian L. Matthews blm@6sceng.UUCP