comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: Generic body
Date: Thu, 15 May 2008 01:43:12 -0700 (PDT)
Date: 2008-05-15T01:43:12-07:00	[thread overview]
Message-ID: <1305764a-2bae-4fd9-b2b6-ee24fd94682a@f36g2000hsa.googlegroups.com> (raw)
In-Reply-To: g0fash$73v$1@registered.motzarella.org

Here is how to do it...
--

package MyPack is

   generic
     type Toto is limited private;
   procedure MyProc;

   procedure MyProcInt;
   procedure MyProcChr;

end MyPack;

package body MyPack is

   procedure MyProc is
   begin
     null; -- Some stuff
   end MyProc;

   procedure MyProcInt_internal is new MyProc(Toto => Integer);
   procedure MyProcChr_internal is new MyProc(Toto => Character);

   procedure MyProcInt renames MyProcInt_internal;
   procedure MyProcChr renames MyProcChr_internal;

end MyPack;
__________________________________________________________________
Gautier's Ada programming -- http://sourceforge.net/users/gdemont/

NB: For a direct answer, e-mail address on the Web site!



  parent reply	other threads:[~2008-05-15  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14 18:26 Generic body Sébastien
2008-05-14 21:49 ` Randy Brukardt
2008-05-14 21:51 ` Samuel Tardieu
2008-05-14 22:03 ` Adam Beneschan
2008-05-15  9:25   ` Sébastien
2008-05-15 14:59     ` Adam Beneschan
2008-05-15 15:40       ` Sébastien
2008-05-15  8:43 ` gautier_niouzes [this message]
2008-05-15 13:11   ` Sébastien
replies disabled

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