From: Samuel Mize <smize@imagin.net>
Subject: Re: Printing Enum Variable Re: Linux World
Date: 1999/03/04
Date: 1999-03-04T00:00:00+00:00 [thread overview]
Message-ID: <7bmu66$2eqc@news3.newsguy.com> (raw)
In-Reply-To: 7bmmu2$n0h@news1.newsguy.com
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
next prev parent reply other threads:[~1999-03-04 0:00 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-02 0:00 Linux World Richard D Riehle
1999-03-02 0:00 ` fraser
1999-03-02 0:00 ` Printing Enum Variable " David Starner
1999-03-03 0:00 ` Larry Kilgallen
1999-03-03 0:00 ` Nick Roberts
1999-03-03 0:00 ` David Starner
1999-03-03 0:00 ` Fraser Wilson
1999-03-03 0:00 ` David Starner
1999-03-04 0:00 ` Magnus Larsson
1999-03-03 0:00 ` Printing Enum Variable Re: Linux World (Correction) Hans Marqvardsen
1999-03-03 0:00 ` Printing Enum Variable Re: Linux World Hans Marqvardsen
1999-03-04 0:00 ` Nick Roberts
1999-03-04 0:00 ` robert_dewar
1999-03-04 0:00 ` Hans Marqvardsen
1999-03-05 0:00 ` dewar
1999-03-05 0:00 ` David Botton
1999-03-05 0:00 ` robert_dewar
1999-03-05 0:00 ` Larry Kilgallen
1999-03-04 0:00 ` Hans Marqvardsen
1999-03-05 0:00 ` dewar
1999-03-07 0:00 ` Hans Marqvardsen
1999-03-04 0:00 ` fraser
1999-03-05 0:00 ` Nick Roberts
1999-03-05 0:00 ` fraser
1999-03-04 0:00 ` Richard D Riehle
1999-03-04 0:00 ` Richard D Riehle
1999-03-04 0:00 ` robert_dewar
1999-03-03 0:00 ` fraser
1999-03-03 0:00 ` David Starner
1999-03-03 0:00 ` Samuel T. Harris
1999-03-03 0:00 ` fraser
1999-03-04 0:00 ` dennison
1999-03-04 0:00 ` Ehud Lamm
1999-03-04 0:00 ` robert_dewar
1999-03-03 0:00 ` David Starner
1999-03-04 0:00 ` robert_dewar
1999-03-04 0:00 ` Samuel Mize
1999-03-04 0:00 ` Samuel Mize [this message]
1999-03-05 0:00 ` Robert A Duff
1999-03-05 0:00 ` Robert A Duff
1999-03-07 0:00 ` Florian Weimer
1999-03-07 0:00 ` Michael Young
1999-03-07 0:00 ` Matthew Heaney
1999-03-08 0:00 ` Michael Young
1999-03-08 0:00 ` Matthew Heaney
1999-03-07 0:00 ` Larry Kilgallen
1999-03-07 0:00 ` Michael Young
1999-03-08 0:00 ` robert_dewar
1999-03-08 0:00 ` Richard D Riehle
1999-03-09 0:00 ` Michael Young
1999-03-09 0:00 ` Larry Kilgallen
1999-03-09 0:00 ` billy
1999-03-10 0:00 ` Pascal Obry
1999-03-10 0:00 ` robert_dewar
1999-03-10 0:00 ` Dale Stanbrough
1999-03-10 0:00 ` dennison
1999-03-10 0:00 ` bob
1999-03-10 0:00 ` Mike Silva
1999-03-10 0:00 ` dennison
1999-03-10 0:00 ` Nick Roberts
1999-03-10 0:00 ` Richard D Riehle
1999-03-10 0:00 ` Pascal Obry
1999-03-09 0:00 ` Michael Young
1999-03-10 0:00 ` Mike Silva
[not found] ` <7 <7c58qa$b6b$1@cf01.edf.fr>
1999-03-10 0:00 ` fraser
[not found] ` <7c4ru6$e45$1@remarq.com>
1999-03-10 0:00 ` fraser
[not found] ` <1999Mar9.131659. <dale-1003991644340001@r1021c-07.ppp.cs.rmit.edu.au>
1999-03-10 0:00 ` Larry Kilgallen
1999-03-08 0:00 ` Larry Kilgallen
1999-03-08 0:00 ` robert_dewar
1999-03-08 0:00 ` Florian Weimer
1999-03-04 0:00 ` Ehud Lamm
1999-03-05 0:00 ` Richard D Riehle
1999-03-05 0:00 ` Nick Roberts
1999-03-06 0:00 ` Ehud Lamm
1999-03-06 0:00 ` robert_dewar
1999-03-06 0:00 ` Ehud Lamm
1999-03-06 0:00 ` Larry Kilgallen
1999-03-06 0:00 ` Dave Taylor
1999-03-06 0:00 ` Bruce or Tracy
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox