Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!ig!arizona!robert From: robert@cs.arizona.edu (Robert J. Drabek) Newsgroups: comp.lang.c Subject: Re: How many values in an enum (Was: Enumerated types... what's the point?) Message-ID: <19589@megaron.cs.arizona.edu> Date: 30 Mar 90 00:31:10 GMT References: <1990Mar22.053148.10351@ncsuvx.ncsu.edu> <1472@polari.UUCP> Organization: U of Arizona CS Dept, Tucson Lines: 13 > |How do you get the compiler to tell you how many values an enumerated > |type has? Does this just refer to defining a final value, like > |enum days_of_week = {SUNDAY, MONDAY, TUESDAY, WEDNESDAY, > | THURSDAY, FRIDAY, SATURDAY, N_DAYS_OF_WEEK }; Or: (SATURDAY - SUNDAY + 1) -- Robert J. Drabek robert@cs.Arizona.EDU Department of Computer Science uunet!arizona!robert The University of Arizona 602 621 4326 Tucson, AZ 85721