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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f071b0868ee342f,start X-Google-Attributes: gid103376,public From: "Anthony E. Glover" Subject: Design Question: How Best To Structure Cross-Referencing Types In Ada 95 Date: 1999/01/20 Message-ID: <36A68FCA.E1EEAFFE@hiwaay.net>#1/1 X-Deja-AN: 435053683 Content-Type: multipart/mixed; boundary="------------6448902F32C077DF069276B5" Organization: ELMCO, Inc. MIME-Version: 1.0 Reply-To: aeg@hiwaay.net, glover@thaad.tecmasters.com Newsgroups: comp.lang.ada Date: 1999-01-20T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------6448902F32C077DF069276B5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Just recently switched our development environment to Ada95 and have come across a problem that may lend itself to some new Ada95 capability. I have some new code that has private types that reference each other. In Ada83 I have something that looks like: package XYZ is type Part is private; type Car is private; procedure Install( On_Car : Car; The_Part : Part ); procedure Activate( The_Part : Part ); private type Part is record Parent_Car : Car; end record; type Car is record Part1 : Part; Part2 : Part; end record; end XYZ; Since both types and some of the subprograms reference each other, I have to put them both in the same package. It turns out that I have about 5 types that behave like this and I end up with one large package. I would rather have the types split into different packages, but I would get circular dependencies when compiling the specs. Is there a neat Ada95 way of getting around this cross-referencing problem? Tony aeg@hiwaay.net glover@thaad.tecmasters.com -- Tony Glover ELMCO, Inc. (256)721-6317 aeg@hiwaay.net --------------6448902F32C077DF069276B5 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Anthony E. Glover Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Anthony E. Glover n: Glover;Anthony E. org: ELMCO, Inc. email;internet: aeg@hiwaay.net title: Senior Software Engineer x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard --------------6448902F32C077DF069276B5--