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,51e16ccc6a07b0c7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-24 15:12:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed2.earthlink.net!newsfeed.earthlink.net!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3ECFEE21.5030304@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: circular unit dependency References: <3ECDE7D1.9010507@alcatel.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1053814325 24.62.164.137 (Sat, 24 May 2003 22:12:05 GMT) NNTP-Posting-Date: Sat, 24 May 2003 22:12:05 GMT Organization: AT&T Broadband Date: Sat, 24 May 2003 22:12:05 GMT Xref: archiver1.google.com comp.lang.ada:37740 Date: 2003-05-24T22:12:05+00:00 List-Id: Stephen Leake wrote: > If you have something like: > > with A; > package B is > > type B_Type is record > A_Obj : A.A_Type; > end record; > end B; > > with B; > package A is > > type A_Type is record > B_Obj : B.B_Type; > end record; > end A; > > then the only way to "fix" this is to put both types in one package. > They belong together, since they are dependent on each other. Actually if he has a circular definition like that, he needs to do more than just change the package structure. There is no way that a object of A_Type or B_Type can exist. He would need to add an access type to break the cycle.