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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a85dd10bdbdb69d4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-10 08:58:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!news-hub.cableinet.net!blueyonder!btnet-peer!btnet!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!solway.cl.cam.ac.uk!sjm217 From: news01+Steven.Murdoch@cl.cam.ac.uk (Steven Murdoch) Newsgroups: comp.lang.ada Subject: Re: Giving a package specification access to the private types of another package Date: 10 Dec 2002 16:58:21 GMT Organization: University of Cambridge, England Sender: sjm217@solway.cl.cam.ac.uk (Steven Murdoch) Message-ID: References: NNTP-Posting-Host: solway.cl.cam.ac.uk X-Newsreader: xrn 9.02 Xref: archiver1.google.com comp.lang.ada:31648 Date: 2002-12-10T16:58:21+00:00 List-Id: In article , Robert A Duff writes: >news01+Steven.Murdoch@cl.cam.ac.uk (Steven Murdoch) writes: > >>... A is used by B and by no other package, >> all of the procedures in A are used by B. > >Then A is really part of the implementation of B, so it should be >"private package B.A is...". I think this is what I have done - and it works. My code is equivalent to the example below. This works and seems to be the best way to do it. -- b.ads package B is procedure Proc_B; private type Private_Type is new Integer; end B; -- -- b.adb with B.A; package body B is procedure Proc_B is Temp: Private_Type; begin A.Foobar(Temp); end; end B; -- -- b-a.ads private package B.A is procedure Foobar(Temp: in Private_Type); end B.A; -- -- b-a.adb package body B.A is procedure Foobar(Temp: in Private_Type) is begin null; end; end B.A; -- Thank you, Steven Murdoch.