comp.lang.ada
 help / color / mirror / Atom feed
* package child question
@ 2000-02-08  0:00 Christoph Grein
  0 siblings, 0 replies; 13+ messages in thread
From: Christoph Grein @ 2000-02-08  0:00 UTC (permalink / raw)
  To: comp.lang.ada

Matthew Heaney has pointed out the cause of your problem.

Apart from renaming, another solution is possible. Remember that any library
unit is supposed to be a child of Standard, so you might write

with A.B;
package body B.A is  -- this A hides the imported one

begin
   declare
      use Standard.A.B;  -- qualification makes it accessible again
   begin
      null;
   end;
end B.A;









^ permalink raw reply	[flat|nested] 13+ messages in thread
* package child question
@ 2000-02-07  0:00 Georg Bauhaus
  2000-02-07  0:00 ` Jean-Pierre Rosen
  2000-02-08  0:00 ` Matthew Heaney
  0 siblings, 2 replies; 13+ messages in thread
From: Georg Bauhaus @ 2000-02-07  0:00 UTC (permalink / raw)


Hello,
I wonder if someone could help me pointing out to me what I've done
wrong in the following two library hierarchies; the first has
a parent and a child, not withing anything, while the second
hierarchy's child body withes the child of the first, like this:

package A is
end A;

package A.B is
end A.B;


package B is
end B;

package B.A is
   pragma Elaborate_Body;
end B.A;

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)?


  Georg Bauhaus




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2000-02-11  0:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-08  0:00 package child question Christoph Grein
  -- strict thread matches above, loose matches on Subject: below --
2000-02-07  0:00 Georg Bauhaus
2000-02-07  0:00 ` Jean-Pierre Rosen
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

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