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,d30fc565847675b3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-25 11:31:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3DE27A83.1050803@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Help : Circular dependency References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 25 Nov 2002 19:30:26 GMT NNTP-Posting-Host: 63.184.33.125 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1038252626 63.184.33.125 (Mon, 25 Nov 2002 11:30:26 PST) NNTP-Posting-Date: Mon, 25 Nov 2002 11:30:26 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:31220 Date: 2002-11-25T19:30:26+00:00 List-Id: prashna wrote: > Can anybody explain, with example, What is circular dependecy? with B; package A is type T is (Ay, Has, Tipe, Tee); procedure Op (P1 : in T; P2 : in B.T); end A; with A; package B is type T is (Bee, Has, Tipe, Tee); procedure Op (P1 : in T; P2 : in A.T); end B; A depends on B, and B depends on A. You can remove this by moving one of the type declarations up to a parent package (or moving the operations to a child package): package A is type T is (Ay, Has, Tipe, Tee); end A; with B; package A.Ops is procedure Op (P1 : in T; P2 : in B.T); end A; with A; package B is type T is (Bee, Has, Tipe, Tee); procedure Op (P1 : in T; P2 : in A.T); end B; Now A does not depend on B, and B does not depend on A.Ops, so there is no circularity. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail