comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Generic child units
Date: 16 May 2003 21:04:07 -0400
Date: 2003-05-16T21:04:07-04:00	[thread overview]
Message-ID: <wccel2yidtk.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: uhe7ud7a6.fsf@nasa.gov

Stephen Leake <Stephe.Leake@nasa.gov> writes:

> Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> > Here's the AARM text:
> > 
> >  18    A child of a parent generic package shall be instantiated or renamed
> >  only within the declarative region of the parent generic.
> 
> But in my code above, Chi is an instantiation of "a child of a parent
> generic package", and it is _not_ "within the declarative region of
> the parent generic".

No, Chi is not a child of Parent, it is a child of Par, which is a
package, not a generic package.

> I see. So I actually instantiated Par.Child (as the code actually says
> :), which is _not_ a "child of a generic parent", even though I think
> of it that way. 

That's right.  It's very similar to what happens if you had Child
physically nested within Parent.

The way to think of it is, when you instantiate Parent as Par, you get a copy
of all the children, and they are called (for example) Par.Child.
However you can't *see* them unless you say "with Parent.Child".
The  "with Parent.Child" has a somewhat magical effect: it makes *.Child
visible, for all * that are instances of Parent (Par, in your case).

> That makes sense. As is sometimes the case, the ARM is not immediately
> clear to us non-lawyers.

Well, this is one of the more arcane rules in the language.

- Bob



  parent reply	other threads:[~2003-05-17  1:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-13 17:46 Generic child units 
2003-05-13 18:38 ` Stephen Leake
2003-05-13 19:18   ` David C. Hoos
2003-05-14  7:56   ` 
2003-05-15 16:30     ` Stephen Leake
2003-05-16  1:08     ` Robert A Duff
2003-05-16 19:24       ` Stephen Leake
2003-05-16 23:47         ` Georg Bauhaus
2003-05-17  0:57           ` Robert A Duff
2003-05-17  1:11             ` Georg Bauhaus
2003-05-17  1:04         ` Robert A Duff [this message]
2003-05-16 23:44       ` Georg Bauhaus
2003-05-17  0:23   ` Georg Bauhaus
2003-05-17  1:00     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox