Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!orchid!jagardner From: jagardner@orchid.UUCP Newsgroups: comp.lang.c Subject: Re: enum type Message-ID: <10360@orchid.waterloo.edu> Date: Mon, 24-Aug-87 18:59:12 EDT Article-I.D.: orchid.10360 Posted: Mon Aug 24 18:59:12 1987 Date-Received: Tue, 25-Aug-87 07:05:35 EDT References: <2048@umn-cs.UUCP> <6311@brl-smoke.ARPA> <2238@xanth.UUCP> Reply-To: datanguay@watbun.waterloo.edu (David Tanguay) Organization: U. of Waterloo, Ontario Lines: 19 Keywords: bleech! In article <2238@xanth.UUCP> kent@xanth.UUCP (Kent Paul Dolan) writes: > >Looks to me like whoever added enums to C got a bit carried away when >they included intiializers. C already had a very nice and well >#defined facility for named constants; the one created by allowing >initializers with enum is redundant, and seems (from postings running ^^^^^^^^^ >back a month or so ago) to have created a headache for the standards >process. #define XX_SOMETHING 1 .... #define XX_ELSE 295 Now insert a new definition at position 42. This requires changing all those #defines. enums make it easy (you can also say XX_LAST at the end and use that as the number of things in the enum (if you don't use =)). David Tanguay