comp.lang.ada
 help / color / mirror / Atom feed
* Generic body
@ 2008-05-14 18:26 Sébastien
  2008-05-14 21:49 ` Randy Brukardt
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sébastien @ 2008-05-14 18:26 UTC (permalink / raw)


Hi,

I'm trying to create a generic procedure with some instance in the same 
package.

package MyPack is

   generic
     type Toto is limited private;
   procedure MyProc;

   procedure MyProcInt is new MyProc(Toto => Integer);
   procedure MyProcStr is new MyProc(Toto => String);

end MyPack;

package body MyPack is

   procedure MyProc is
   begin
     -- Some stuff
   end MyProc;

end MyPack;

I don't how to do this because:
1) The compiler refuse the instance of MyProc because it doesn't have 
the MyProc body
2) If I put the body of MyProc in the package spec, the compiler refuses 
it because it's not the right place.

Thanks by advance for any help

Sebastien



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-05-15 15:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2008-05-15 13:11   ` Sébastien

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