From: Marin David Condic <nobody@noplace.com>
Subject: Re: Ada problem
Date: Mon, 15 Nov 2004 12:49:48 GMT
Date: 2004-11-15T12:49:48+00:00 [thread overview]
Message-ID: <MB1md.11529$_J2.5596@newsread2.news.atl.earthlink.net> (raw)
In-Reply-To: <HqTld.125$rc.98808@news20.bellglobal.com>
Sandro Magi wrote:
> Or:
>
> with Ada.Text_IO.Enumeration_IO;
>
> procedure values is
> type Days is (monday, tuesday, wednesday);
> package Days_IO is
> new Ada.Text_IO.Enumeration_IO (Days);
> begin
>
> Days_IO.Put(Days'First);
>
> end values;
>
Note also that it is a bit easier to include a "use" clause for the
package instantiation:
with Ada.Text_IO.Enumeration_IO ;
procedure Values is
type Days is (Monday, Tuesday, Wednesday) ;
package
Days_IO
is new
Ada.Text_IO.Enumeration_IO (Days) ;
--
use Days_IO ;
--
begin
for X in Days'Range loop
Put (X) ;
end loop ;
end Values ;
MDC
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm
Send Replies To: m o d c @ a m o g
c n i c . r
"Power corrupts. Absolute power is kind of neat"
-- John Lehman, Secretary of the Navy 1981-1987
======================================================================
prev parent reply other threads:[~2004-11-15 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-14 23:47 Ada problem ada_newbie
2004-11-15 1:08 ` Larry Hazel
2004-11-15 1:15 ` Sandro Magi
2004-11-15 12:49 ` Marin David Condic [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox