Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: enums Message-ID: <1988Jul22.171612.6225@utzoo.uucp> Organization: U of Toronto Zoology References: <1608@dataio.Data-IO.COM> <469@m3.mfci.UUCP> Date: Fri, 22 Jul 88 17:16:12 GMT In article <469@m3.mfci.UUCP> karzes@mfci.UUCP (Tom Karzes) writes: >While on the subject of enums, here's something that's always bothered me. >If you define an enum with a long list of values, a natural thing to want >to do is determine the number of values in the enum... >Does ANSI C provide a reasonable way to do this? No. X3J11 C (it's not quite officially ANSI C yet) almost didn't include enums at all, since they are so obviously a crude patch onto the language. It does in fact include them, in the simplest and stupidest form possible. -- Anyone who buys Wisconsin cheese is| Henry Spencer at U of Toronto Zoology a traitor to mankind. --Pournelle |uunet!mnetor!utzoo! henry @zoo.toronto.edu