comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Common ancestor (visibility rules)
Date: 2000/03/30
Date: 2000-03-30T00:00:00+00:00	[thread overview]
Message-ID: <8bu64t$60h$1@nnrp1.deja.com> (raw)
In-Reply-To: 8bt42b$tfe$1@nnrp1.deja.com

In article <8bt42b$tfe$1@nnrp1.deja.com>,
  dmitry6243@my-deja.com wrote:
> In article <8bskgp$ctu$1@nnrp1.deja.com>,
> Robert Dewar <dewar@gnat.com> wrote:
> with A; use A;           -- OK with Aonix, error in GNAT
>(v3.12)

The above is perfectly fine, and compiles fine with all versions
of GNAT, you are either compiling code different from what
you quoted, or you have a messed up copy of GNAT.

> I.e. Standard is a unit, but not a library unit. Then there
seems to be
> two arts of unit names: library names starting with Standard
that can be
> *used* but not *withed*, then "un-library" names without
Standard
> prefix. They can be *withed* and sometimes *used*. Right?

No one EVER needs to use a diction like

with A; use Standard.A;

so it is a waste of time to discuss it. and your two "arts"
of unit names is pure confusion, please carefully reread my
previous post (I don't know how to make it clearer!)

> It is works in GNAT and illegal in Aonix, but see above.

I *think* it should be legal, but since no one would ever
write this, it is totally pointless, it is not important.


> So GNAT is wrong?

No, of course GNAT handles this right. You should perhaps
publish the ENTIRE code you have that GNAT rejected. You
gave two quite different examples of code so far, and
neither had with A; use A; in it.

> I do not see how. Either Standard.A is the name of A or not.
If yes then
> why "with Standard.A;" is illegal. If not, why "use
Standard.A;" is
> legal.

My previous post really answered this quite clearly.

> It is clear that there is no need to *with* Standard for it is
always
> *withed*. The question is what the name of a library unit is.
Does it
> include "Standard." as prefix or not. IF the fully qualified
name of A
> is Standard.A, then "with Standard.A; use Standard.A;" SHALL
be correct.

That's quite wrong, please reread my previous note.

I will say the rule once more, after that you really need to
read and figure it out :-)

You can only WITH a library unit, library units are the units
that are child units of Standard.

So if you say

  with Standard.A;

you are saying that Standard.A is a library unit, i.e. that
it is a child of Standard, i.e. that its fully qualified nanme
is Standard.Standard.A.

The fully qualified name always includes Standard, but you can
NOT use this fully qualified name in a WITH clause!



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




  reply	other threads:[~2000-03-30  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
2000-03-29  0:00     ` Robert Dewar
2000-03-29  0:00       ` dmitry6243
2000-03-30  0:00         ` Robert Dewar [this message]
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