comp.lang.ada
 help / color / mirror / Atom feed
From: dmitry6243@my-deja.com
Subject: Re: Common ancestor (visibility rules)
Date: 2000/03/29
Date: 2000-03-29T00:00:00+00:00	[thread overview]
Message-ID: <8bsgpf$96f$1@nnrp1.deja.com> (raw)
In-Reply-To: 8bq726$lo8$1@nnrp1.deja.com

In article <8bq726$lo8$1@nnrp1.deja.com>,
Robert Dewar <robert_dewar@my-deja.com> wrote:

> No need to invent a new name, it is called Standard
>
> Then package A could be specified as
> > Root.A and A's Foo as Root.A.Foo.

Yes, "Standard" was actually my first attempt, but I tried the
following (of course in the real program):
-------------------- b-a.adb
with Standard.A; use Standard.A;
separate (B)
procedure A is
begin
   Foo;
end A;

which does not work, because compiler do not understand withing of
Standard.A. This caused my confusion. The correct version is:
-------------------- b-a.adb
with A; use Standard.A;
separate (B)
procedure A is
begin
   Foo;
end A;

I must say, that the difference is rather subtle. I suppose it has some
relation with unit library management. Perhaps compiler should first
search for physical childs of Standard and then in case of failure,
discard the "Standard" prefix, so that:

with Standard.A; use Standard.A;

would be correct?

> > Interesting is that C++ has this
> > feature.
>
> Perhaps they copied it from Ada 95 :-)

Surely they did! (:-))

Regards,
Dmitry Kazakov


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-03-29  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-28  0:00 Common ancestor (visibility rules) dmitry6243
2000-03-28  0:00 ` Steve Folly
2000-03-28  0:00 ` Robert Dewar
2000-03-29  0:00   ` dmitry6243 [this message]
2000-03-29  0:00     ` Robert Dewar
2000-03-29  0:00       ` dmitry6243
2000-03-30  0:00         ` Robert Dewar
2000-03-30  0:00           ` dmitry6243
2000-03-30  0:00             ` Tucker Taft
2000-03-31  0:00               ` dmitry6243
2000-04-01  0:00               ` Robert Dewar
2000-04-01  0:00               ` Robert Dewar
replies disabled

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