Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!apple!mips!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.c Subject: Re: Number of enums Message-ID: <279DC67C.6ABD@tct.uucp> Date: 23 Jan 91 17:23:08 GMT References: <703@caslon.cs.arizona.edu> <1991Jan21.133917.18458@cbnews.att.com> <708@caslon.cs.arizona.edu> Organization: Teltronics/TCT, Sarasota, FL Lines: 18 According to dave@cs.arizona.edu (Dave P. Schaumann): >Of course, the optimal solution would be for ANSI to adopt a 'numberof' >with functionality similar to 'sizeof', so that you could say >numberof(ThingList) to get the number of values. Hardly. Given: typedef enum { CORGE = -100, QUUX = -50, LARRY = 1, MOE = 2, CURLY = 4, JOE = 9, EX_PARROT = 32767 } PLUGH; Of what use would numberof(PLUGH) be? -- Chip Salzenberg at Teltronics/TCT , "If Usenet exists, then what is its mailing address?" -- me "c/o The Daily Planet, Metropolis." -- Jeff Daiell