Newsgroups: comp.lang.c
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!peruvian.utah.edu!u-beasth
From: u-beasth%peruvian.utah.edu@cs.utah.edu (bryant eastham)
Subject: Re: Grouse: What's the point of enum?
Date: 18 Apr 91 10:47:58 MDT
Message-ID: <1991Apr18.104758.27938@hellgate.utah.edu>
Keywords: enum
Sender: Bryant Eastham
Organization: The Center for Engineering Design
References: <gu1k13w164w@cellar.UUCP> <1991Apr18.153418.13527@zoo.toronto.edu>

  Why ignore a construct that CAN give a clearer meaning to your programs?
Using an enum can:

   1) Allow a sequence of values to be assigned to identifiers
      without a bunch of #defines. (Not really a big benefit.)

   2) Allow the compiler to flag type violations on those constants. The
      other option would allow any integer to be passed, where using an
      enum can be checked. This is a considerable advantage.

  In general: Use what they give you to the best advantage!

  Bryant Eastham
  A programmer who cannot live without nested #includes OR enums.


