comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <Mats.Weber@elca-matrix.ch>
Subject: Re: Generic procedures
Date: 1997/11/13
Date: 1997-11-13T00:00:00+00:00	[thread overview]
Message-ID: <346B2BEF.D00FF2A2@elca-matrix.ch> (raw)
In-Reply-To: 34684A49.5BE8D37@masda.hv.se


Tobias Ritzau wrote:

> I wonder if it is possible to have a generic procedure in a
> package and do some instations in the same spec.

It's not directly possible, because you can instantiate only after elaboration
of the generic's body. The following little package shows you how you can work
around the problem.


package p is
   
   generic
   procedure gp;

   procedure p; -- is new gp;

end p;

package body p is
   
   procedure gp is
   begin
      null;
   end gp;

   procedure pi is new gp;

   procedure p renames pi;

end p;




  reply	other threads:[~1997-11-13  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-11  0:00 Generic procedures Tobias Ritzau
1997-11-13  0:00 ` Mats Weber [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-11-14  0:00 Scott Edgerton {81813}
replies disabled

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