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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f51e93dacd9c7fca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 11:57:22 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!world!news From: Robert A Duff Subject: Re: status of Ada STL? Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Tue, 18 Jun 2002 18:56:43 GMT References: NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:26278 Date: 2002-06-18T18:56:43+00:00 List-Id: Pascal Obry writes: > What about this, the use here is not possible: > > package P is > X : Integer; > end P; > > with P; > procedure P2 is > > P : Integer; > > procedure Proc is > -- use P; <- this is not possible because P integer > V : Integer; > begin > V := Standard.P.X; <- and you need full qualified name > end Proc; > > begin > null; > end P2; I'm not sure what the point of this example is, other than that one can write obscure code. You're right that "use P;" would be illegal there (although "use Standard.P;" would be legal). So? The right thing to do is change the name of one of those P's. (I would disallow hiding altogether, if I ran the show.) > Also all the "with" are in the same places, easy to find, but "use" > can be put in any part of the code. And you certainly don't want to > "use" all packages, right ? All symbols visible ? No. I don't know what Russ meant, but I meant that "use" in a context clause would imply a "with". A "use" anywhere else would not (thus preserving the property that all the imported packages are mentioned at the top). - Bob