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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a4380ff535aa24d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-05 14:17:41 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!ray.com!news.ray.com!news.ed.ray.com!swlvx2!jgv From: jgv@swl.msd.ray.com (John Volan) Subject: Elaboration order [was: cross linking packages] Sender: news@swlvx2.msd.ray.com (NEWS USER) Organization: Raytheon Company, Tewksbury, MA Message-ID: References: <3bn3vj$pch@gnat.cs.nyu.edu> <3bg8mp$i0g@gnat.cs.nyu.edu> <3bj0br$mri@network.ucsd.edu> Date: Mon, 5 Dec 1994 20:57:53 GMT Date: 1994-12-05T20:57:53+00:00 List-Id: dewar@cs.nyu.edu (Robert Dewar) writes: >Matt a brief answer to your question is that order of elaboration of >types is critical, and in particular if package a with's package b, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >it is essential that the spec of b be elaborated before the spec of a. Did you mean to say: (1) "if the *spec* of package A with's package B, then the spec of B must be elaborated before the spec of A" or did you mean: (2) "if package A (anywhere, either in its spec or its body) with's package B, then the spec of B must be elaborated before the spec of A" Without hunting through the RM9X for a relevant chapter and verse, it seems to me that Ada only requires (1) to be enforced. If (2) were the case, then it would be impossible to have "mutually-coupled" packages, where the bodies of A and B both "with" each other's specs. But clearly this is allowed. (Moreover, it seems to work very nicely in GNAT.) Of course, the spec of A must be elaborated before the body of B, and the spec of B must be elaborated before the body of A. But does Ada require any ordering of the elaborations of the two bodies? Or perhaps I should ask, under what circumstances would Ada require a particular order of elaboration between two package bodies? -- John Volan -------------------------------------------------------------------------------- -- Me : Person := (Name => "John Volan", -- Company => "Raytheon Missile Systems Division", -- E_Mail_Address => "jgv@swl.msd.ray.com", -- Affiliation => "Enthusiastic member of Team Ada!", -- Humorous_Disclaimer => "These opinions are undefined " & -- "by my employer and therefore " & -- "any use of them would be " & -- "totally erroneous."); --------------------------------------------------------------------------------