comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Signature Package With Generic Proceedure
Date: Mon, 23 Jul 2012 11:26:03 +0100
Date: 2012-07-23T11:26:03+01:00	[thread overview]
Message-ID: <m21uk2sric.fsf@nidhoggr.home> (raw)
In-Reply-To: 045f7b44-2a4a-4292-80fd-0b6bc8ee3465@googlegroups.com

Keean Schupke <keean.schupke@googlemail.com> writes:

> If I have a package which defines a procedure like:
>
>
> generic
>     with procedure Process(Set : in out Set_Type);
> procedure Update(Set : in out Set_Type);
>
>
> How do a declare a Signature package that includes this?
>
>
> generic
>     with generic
>         with procedure Process(Set : in out Set_Type);
>     procedure Update(Set : in out Set_Type);
> package Set_Signature is end;
>
>
> Is not allowed. Is there some way to do this with nested packages?

I guess you meant to say

   generic
       type Set_Type is limited private;
       ...
       with generic
           with procedure Process(Set : in out Set_Type);
       procedure Update(Set : in out Set_Type);
       ...
   package Set_Signature is end;

? in which case I don't see why you couldn't say

   generic
       type Set_Type is limited private;
       ...
       with procedure Update(Set : in out Set_Type);
       ...
   package Set_Signature is end;

Seems to me that all you need is for the actual Update to have that
profile, who cares how it got that way?

I've probably misunderstood this. Could maybe child units help?

   generic
      with procedure Process (Set : in out Set_Type);
   procedure Set_Signature.Update (Set : in out Set_Type);



  parent reply	other threads:[~2012-07-26 15:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <045f7b44-2a4a-4292-80fd-0b6bc8ee3465@googlegroups.com>
2012-07-21 22:22 ` Signature Package With Generic Proceedure Adam Beneschan
2012-07-22  7:28   ` Dmitry A. Kazakov
2012-07-22 16:22   ` Keean Schupke
2012-07-23  0:45     ` Adam Beneschan
     [not found]       ` <79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com>
     [not found]         ` <500d3a9d$0$6566$9b4e6d93@newsspool4.arcor-online.net>
2012-07-23 18:29           ` Keean Schupke
     [not found]         ` <ac8bfaed-dbcc-491a-a760-c25672445eef@googlegroups.com>
2012-07-23 19:41           ` Keean Schupke
2012-07-24  2:57         ` Randy Brukardt
     [not found]         ` <jul2n4$af5$1@munin.nbi.dk>
2012-07-24  8:02           ` Keean Schupke
2012-07-24  8:43             ` Dmitry A. Kazakov
2012-07-24  8:59               ` Keean Schupke
2012-07-23 10:26 ` Simon Wright [this message]
2012-07-23 18:36   ` Keean Schupke
replies disabled

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