From: Sébastien <seb.morand@gmail.com>
Subject: Generic body
Date: Wed, 14 May 2008 18:26:57 +0000
Date: 2008-05-14T18:26:57+00:00 [thread overview]
Message-ID: <g0fash$73v$1@registered.motzarella.org> (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
next reply other threads:[~2008-05-14 18:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 18:26 Sébastien [this message]
2008-05-14 21:49 ` Generic body 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox