From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: "Common" data
Date: 13 Oct 94 11:47:22
Date: 1994-10-13T11:47:22+00:00 [thread overview]
Message-ID: <EACHUS.94Oct13114722@spectre.mitre.org> (raw)
In-Reply-To: stt@dsd.camb.inmet.com's message of Thu, 13 Oct 1994 03:21:06 GMT
In article <CxLDB7.9DI@inmet.camb.inmet.com> stt@dsd.camb.inmet.com (Tucker Taft) writes:
> I believe Robert Eachus misinterpreted this question. I think the
> question is very simple and very fundamental -- if two
> different compilation units "with" the same package, do you
> end up with just one copy of the data of the package, or
> might you get one for each "with"?
I won't argue about what the original question "meant." If the
questioner is satisfied, fine. Otherwise, we can try to refine the
question. I assumed from the mention of comm code, that the question
had to do with keeping copies of variables in registers.
> The answer is most definitely that you get exactly one
> copy of the data of the package, no matter how many
> times it is "with"ed. This is so fundamental to Ada
> that it may be hard to point to one single place in the manual
> that says it straight out. The introduction to chapter 10 comes
> closest to saying that a program has at most one copy of any given
> compilation unit. Also, when "with" clauses are explained,
> they simply talk about making the "with"ed unit "visible."
If this is the issue, then the answer can be deduced by looking at
the elaboration rules. For instance, for a variable declared in a
package specification withed by several units, look at 10.5(1),
7.2(3), and finally 3.2.1(7): "The object is created."
--
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
next prev parent reply other threads:[~1994-10-13 11:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-10-12 17:37 "Common" data Bob Wells #402
1994-10-12 14:38 ` Robert I. Eachus
1994-10-13 3:21 ` Tucker Taft
1994-10-13 11:47 ` Robert I. Eachus [this message]
1994-10-13 13:45 ` Norman H. Cohen
-- strict thread matches above, loose matches on Subject: below --
1994-10-13 13:22 Keith Arthurs
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox