From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,84b1828b2b26fc4f X-Google-Attributes: gid103376,public From: dmitry6243@my-deja.com Subject: Re: Common ancestor (visibility rules) Date: 2000/03/30 Message-ID: <8bvjo3$n1k$1@nnrp1.deja.com>#1/1 X-Deja-AN: 604308618 References: <8bprin$a37$1@nnrp1.deja.com> <8bq726$lo8$1@nnrp1.deja.com> <8bsgpf$96f$1@nnrp1.deja.com> <8bskgp$ctu$1@nnrp1.deja.com> <8bt42b$tfe$1@nnrp1.deja.com> <8bu64t$60h$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x24.deja.com:80 (Squid/1.1.22) for client 212.79.192.251 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Mar 30 13:10:35 2000 GMT X-MyDeja-Info: XMYDJUIDdmitry6243 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.72 [en] (WinNT; I) Date: 2000-03-30T00:00:00+00:00 List-Id: In article <8bu64t$60h$1@nnrp1.deja.com>, Robert Dewar 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. b-a.adb:1:13: "A" is not a usable package > 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. -------------- a.ads package A is procedure Foo; end A; -------------- b.ads package B is procedure A; end B; -------------- b.adb package body B is procedure A is separate; end B; -------------- b-a.adb with A; use A; separate (B) procedure A is begin Foo; end A; =========================================== >gcc -c b-a.adb b-a.adb:1:13: "A" is not a usable package b-a.adb:5:04: "Foo" is not visible b-a.adb:5:04: non-visible declaration at a.ads:2 > 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! In other words: 1. Fully qualified names cannot be used in WITH clause; 2. Fully qualified names can be used in USE clause; Here "fully qualified name" stays for a name beginning from Standard (I mean the predefined one). As a consequence, WITH and USE clauses use different names. This is what I meant talking about "two diffrent kinds of names". Had I figured it out? (:-)) P.S. You know it for sure. Does ALRM cease to exist? It worked much better to me. I cannot find a new version, mine is dated 1992! (:-(). Regards, Dmitry Kazakov Sent via Deja.com http://www.deja.com/ Before you buy.