From: "Rick Santa-Cruz" <rick_santa_cruz75@msn.com>
Subject: Re: generic with procedure
Date: Wed, 29 Sep 2004 02:06:43 +0200
Date: 2004-09-29T02:06:43+02:00 [thread overview]
Message-ID: <cjcub4$tlm$05$1@news.t-online.com> (raw)
In-Reply-To: mailman.127.1096415795.390.comp.lang.ada@ada-france.org
Hi,
>
> package Container_2a is new My_Container_2a (Integer);
>
> procedure Proc (Item : Element) is
> Put_Line ("hello 2a");
> end Proc;
But this has to be part of a procedure, so that it will compile correctly?
Is it correct that way:
procedure Tester is
package Container_2a is new My_Container_2a (Integer);
procedure Proc (Item : Element) is
Put_Line ("hello 2a");
end Proc;
procedure Bar is new Container_2a.Foo (Proc);
package Container_2b is new My_Container_2b (Integer);
procedure Proc is new Container_2b.Some_Proc;
begin
Bar(19);
end Tester;
Or are there still other ways? I read something with declare, but I am a
real beginner in Ada.
Thanks in advance,
Rick
next prev parent reply other threads:[~2004-09-29 0:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-28 21:52 generic with procedure Rick Santa-Cruz
2004-09-28 23:56 ` Stephen Leake
2004-09-29 0:06 ` Rick Santa-Cruz [this message]
2004-09-29 23:47 ` Stephen Leake
2004-09-29 2:11 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox