From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0d68c502c0ae6 X-Google-Attributes: gid103376,public From: Samuel Mize Subject: Re: Printing Enum Variable Re: Linux World Date: 1999/03/04 Message-ID: <7bmu66$2eqc@news3.newsguy.com>#1/1 X-Deja-AN: 451323352 References: <7bfc2n$jl9@dfw-ixnews5.ix.netcom.com> <7bhh26$r7c$1@remarQ.com> <36DCAC1F.430E2C5E@aasaa.ofe.org> <7bk4v8$kl8$1@remarQ.com> <36DDA761.7B4E8099@aasaa.ofe.org> <7bkrmm$ao1$1@nnrp1.dejanews.com> <36DE0007.5236CEA2@aasaa.ofe.org> <7bmmu2$n0h@news1.newsguy.com> Organization: ImagiNet Communications, Ltd. User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (AIX/3-2) Newsgroups: comp.lang.ada Date: 1999-03-04T00:00:00+00:00 List-Id: There's another point about C-style "enum"s not being a true type. IIRC, the compiler can't easily handle multiple "enum"s with the same identifier in them. Is my recollection correct? How would you code this in C: with text_io; use text_io; procedure a is type US_Bunting_Color is (Red, White, Blue); type Mardi_Gras_Color is (Purple, Green, Black, White); put_line (integer'image (US_Bunting_Color'Pos (Bunting))); put_line (integer'image (Mardi_Gras_Color'Pos (Ribbon))); end a; -- -- outputs: -- 1 -- 3 Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam