comp.lang.ada
 help / color / mirror / Atom feed
From: Anh Vo <anhvofrcaus@gmail.com>
Subject: Re: Help, asking for code to print out an enumerated type
Date: Fri, 21 Nov 2008 09:24:02 -0800 (PST)
Date: 2008-11-21T09:24:02-08:00	[thread overview]
Message-ID: <7f31b71b-f8d0-4721-8abe-aa5075172446@s9g2000prg.googlegroups.com> (raw)
In-Reply-To: 37008a4c-cdbf-42f4-b806-352501419ff6@n33g2000pri.googlegroups.com

On Nov 21, 8:21 am, ChristopherL <clusard...@aol.com> wrote:
> Hello everyone in Ada land,
>
> Today, I'm looking for someone to post all the code to print out an
> enumerated type in Ada 83. Ideally, I would like a small program with
> an enumerated variable containing code to print it out.
>
> Thank you,
> Chris

This code should work for all Ada including Ada 2005. I hope you get
the idea to print any
enumerated values.

with Text_Io;
procedure Print_Enum_Values is
   I_Prefer_Ada : Boolean := True;   -- type Boolean is (True, False);
defined in Standard
begin
   Text_Io.Put_Line ("Are you prefer Ada? " & Boolean'Image
(I_Prefer_Ada));
end Print_Enum_Values;



  parent reply	other threads:[~2008-11-21 17:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <37008a4c-cdbf-42f4-b806-352501419ff6@n33g2000pri.googlegroups.com>
2008-11-21 16:37 ` Help, asking for code to print out an enumerated type Georg Bauhaus
2008-11-21 17:24 ` Anh Vo [this message]
     [not found]   ` <c72d282b-044a-44ac-be29-de9de4188418@z27g2000prd.googlegroups.com>
2008-11-21 18:12     ` Georg Bauhaus
     [not found]       ` <04e810ee-d4f0-4947-b7c9-78790706d20f@s9g2000prg.googlegroups.com>
2008-11-21 18:52         ` Georg Bauhaus
2008-11-21 21:10   ` Jeffrey R. Carter
2008-11-21 21:19     ` Anh Vo
2008-11-21 21:26       ` Anh Vo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox