From owner-freebsd-hackers Thu Oct 17 10:11:03 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA12936 for hackers-outgoing; Thu, 17 Oct 1996 10:11:03 -0700 (PDT) Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA12931; Thu, 17 Oct 1996 10:10:58 -0700 (PDT) Received: from gemini.sdsp.mc.xerox.com ([13.231.132.20]) by alpha.xerox.com with SMTP id <15084(3)>; Thu, 17 Oct 1996 10:10:24 PDT Received: from gnu.sdsp.mc.xerox.com (gnu.sdsp.mc.xerox.com [13.231.133.90]) by gemini.sdsp.mc.xerox.com (8.7.6/8.7.5) with SMTP id NAA19345; Thu, 17 Oct 1996 13:08:11 -0400 (EDT) Received: by gnu.sdsp.mc.xerox.com (4.1/client-1.3) id AA28362; Thu, 17 Oct 96 13:08:09 EDT Message-Id: <9610171708.AA28362@gnu.sdsp.mc.xerox.com> X-Mailer: exmh version 1.6.9 8/22/96 To: phk@freebsd.org Cc: hackers@freebsd.org Subject: Re: enum considered bad ? In-Reply-To: Your message of "Wed, 16 Oct 1996 23:54:30 PDT." <2022.845535270@critter.tfs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Oct 1996 10:08:09 PDT From: "Marty Leisner" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I've noticed that "enum" is hardly ever used in C programs, is this > because people consider it a bad idea or because they havn't really > got the swing of it ? > > -- > Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. > http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. > whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. > Future will arrive by its own means, progress not so. You mean instead of #define...? Its an excellent idea...I saw it in a Doug McIlroy Computing Systems article, and he explained it to me. I never saw it documented any (why to use enum's for constants). enum in the normal way is used a lot. -- marty leisner@sdsp.mc.xerox.com Member of the League for Programming Freedom