comp.lang.ada
 help / color / mirror / Atom feed
From: weisek@source.asset.com (Kevin Weise)
Subject: Re: mini-quiz
Date: 19 Dec 1994 15:31:35 -0500
Date: 1994-12-19T15:31:35-05:00	[thread overview]
Message-ID: <3d4qj7$9dd@source.asset.com> (raw)
In-Reply-To: 3cq9nh$5v2@salyko.cube.net

In article <3cq9nh$5v2@salyko.cube.net>,
Oliver Kellogg <okellogg@cube.net> wrote:
>package Pkg is
>   type Typ is (eins, zwei);
>end Pkg;
>
>with Pkg;
>package Test is
>   package Pkg is
>      type Typ is (un, deux);
>   end Pkg;
>   X : Pkg.Typ;
>end Test;
>
>--Quick, without compiling (-: Of which type is X, Pkg.Typ, or Test.Pkg.Typ ?

X is of type Test.Pkg.Type.  This is because the identifier for the 
nested package Pkg is a homonym of the library package Pkg identifier,
and being an inner declaration, hides the library unit identifier.

>--Bonus question: Where in the LRM ('83 or '95) is this documented ?

Ada83, Ch. 8.3 (Visibility), paragraphs 14, 15, and 21.

>
>-- Oliver M. Kellogg | mail: okellogg@cube.net | fax: (+49)89-60723732 --
>-- Dept. RST13, Deutsche Aerospace AG, P.O. Box 801169, D-81663 Munich --
>

----------------------------------------------------------------
Kevin J. Weise			weisek@source.asset.com
COLSA Corporation		Voice - (205) 922-1512 ext. 2115
6726 Odyssey Drive		FAX   - (205) 971-0002
Huntsville, AL  35806
{Standard Disclaimers about my opinions & my employer's opinions}
{... which are in conflict often enough}
----------------------------------------------------------------
"Admire those who seek the truth;
  avoid those who find it."		Marcel Proust





      parent reply	other threads:[~1994-12-19 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-15 20:42 mini-quiz Oliver Kellogg
1994-12-15 18:59 ` mini-quiz Robert I. Eachus
1994-12-19 20:31 ` Kevin Weise [this message]
replies disabled

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