comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Declaration of private type Containers
Date: Fri, 30 May 2008 16:25:41 +0200
Date: 2008-05-30T16:25:41+02:00	[thread overview]
Message-ID: <fp2p1g.02r.ln@hunter.axlog.fr> (raw)
In-Reply-To: <8910e931-889f-4617-a249-71b5016a13e2@r66g2000hsg.googlegroups.com>

alexander.kleppe@web.de a �crit :
> Thanks so far.
> So if I understand you right, there is no way to declare the list
> package within the spec file of My_Type beside declaring My_Type
> public? 
Think about it. If you were allowed to do that, the full declaration
of My_Type could include a list - and you could end up with a record 
that contains itself...

> I suppose I have to source out the subprograms using the list
> instances in their parameter list out of package A as well...
> So my solution now is a new package spec and body called A.Containers,
> which contains all the container packages and subprograms formerly
> declared in A (which brought the error with private types). The
> alternative would be your suggestion to declare the package as
> A.My_Types_List in package B. Hope that's what you meant, otherwise
> please correct me.
A.My_Types_List cannot be in package B, it has to be a compilation unit.

But if you have other operations that need list, you could have a child 
package that contains the instantiation of lists + other operations on 
lists.

-- 
---------------------------------------------------------
            J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  reply	other threads:[~2008-05-30 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 11:49 Declaration of private type Containers alexander.kleppe
2008-05-30 12:05 ` Dmitry A. Kazakov
2008-05-30 12:21 ` Jean-Pierre Rosen
2008-05-30 13:59   ` alexander.kleppe
2008-05-30 14:25     ` Jean-Pierre Rosen [this message]
2008-05-30 16:00     ` Adam Beneschan
2008-05-31  2:04     ` Steve
2008-05-31  5:28   ` Randy Brukardt
2008-05-30 20:27 ` Matthew Heaney
2008-06-04 15:40   ` alexander.kleppe
replies disabled

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