From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e8fd9bf92374a60a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Declaration of private type Containers Date: Fri, 30 May 2008 16:25:41 +0200 Organization: Adalog Message-ID: References: <6d6feee1-fe69-4d19-9745-4748d341a56e@r66g2000hsg.googlegroups.com> <9hro1g.ni4.ln@hunter.axlog.fr> <8910e931-889f-4617-a249-71b5016a13e2@r66g2000hsg.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1212156418 7360 195.25.228.57 (30 May 2008 14:06:58 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 30 May 2008 14:06:58 +0000 (UTC) User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: <8910e931-889f-4617-a249-71b5016a13e2@r66g2000hsg.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:480 Date: 2008-05-30T16:25:41+02:00 List-Id: 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