Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!tekcae!vice!dougg From: dougg@vice.TEK.COM (Doug Grant) Newsgroups: comp.lang.c Subject: Question on enumeration behavior Keywords: enum Message-ID: <2195@vice.TEK.COM> Date: 14 Jan 88 00:27:16 GMT Distribution: na Organization: Tektronix Inc., Beaverton, Or. Lines: 13 I have observed that when I define an enumeration type, the first enumeration constant receives the integer value 0, the next 1, etc. (using the Berkeley C compiler and Microsoft C 5.0). Is this behavior guaranteed by the ANSI standard? I want to be sure that if I use enumeration constants to index into an array, that the results will be the same, regardless of which (ANSI compatible) C compiler is used to compile my program. Thanks for your assistance, Doug Grant dougg@vice.TEK.COM ...!tektronix!vice!dougg