Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c Subject: Re: Grouse: What's the point of enum? Message-ID: <678@taumet.com> Date: 20 Apr 91 20:30:33 GMT References: <1991Apr18.153418.13527@zoo.toronto.edu> <12236@dog.ee.lbl.gov> <41440@cup.portal.com> Organization: Taumetric Corporation, San Diego Lines: 17 ts@cup.portal.com (Tim W Smith) writes: >Anyway, the real point is to allow lower case names for constants. If >you try this in a header file... "The" real point, eh? Seems like we've have more than one good point mentioned already, but I haven't seen this one yet: Preprocessor defines have no scope. They reach into the internals of structs and functions and can result in mystifying error messages and hard-to-find bugs. The enumeration names are scoped, and can be made local to functions if desired, and can be locally overridden inside functions which don't know and don't want to know about a #define (or enum) buried inside some nested include file. -- Steve Clamage, TauMetric Corp, steve@taumet.com