comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr>
Subject: Re: package child question
Date: 2000/02/07
Date: 2000-02-08T07:56:13+00:00	[thread overview]
Message-ID: <87oi6t$jd$1@wanadoo.fr> (raw)
In-Reply-To: 87mugk$sa3$1@news-hrz.uni-duisburg.de

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]


Georg Bauhaus <sb463ba@d250-hrz.uni-duisburg.de> a �crit dans le message :
87mugk$sa3$1@news-hrz.uni-duisburg.de...
> with A.B;
> package body B.A is
>
> begin
>    declare
>       use A.B;  -- compiler says: "B" not declared in "A"
>    begin
>       null;
>    end;
> end B.A;
>
> This only happens if the use clause is in A.B body statements,
> there is no error message when it is in the context clause of A.B.
> Is there a way out of this, other than choosing different names
> (which works)?
>
The closest 'A' that is visible is B.A, so you "use A.B" really means "use
B.A.B".
If you want to be absolutely, unambiguously sure of what you name, start
with Standard:
use Standard.A.B;

(unless you have also redefined locally Standard, but that would *really* be
looking for trouble :-)

--
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://pro.wanadoo.fr/adalog






  reply	other threads:[~2000-02-07  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-07  0:00 package child question Georg Bauhaus
2000-02-07  0:00 ` Jean-Pierre Rosen [this message]
2000-02-08  0:00   ` Steve Folly
2000-02-09  0:00     ` Jean-Pierre Rosen
2000-02-09  0:00       ` Robert A Duff
2000-02-10  0:00         ` Ehud Lamm
2000-02-09  0:00           ` Marin D. Condic
2000-02-10  0:00             ` Larry Kilgallen
2000-02-10  0:00               ` Pascal Obry
2000-02-09  0:00       ` Georg Bauhaus
2000-02-11  0:00       ` Steve Folly
2000-02-08  0:00 ` Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
2000-02-08  0:00 Christoph Grein
replies disabled

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