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-Thread: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? Date: Tue, 02 Nov 2010 10:38:23 +0100 Organization: Adalog Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 2 Nov 2010 09:38:24 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="vslmL83UgSXHD8TS0/yPxA"; logging-data="19857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XIYFEv9gov/fma7TqHUc+" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 In-Reply-To: Cancel-Lock: sha1:bXzYZz7O7B+ici2/cexcL7buQMA= Xref: g2news2.google.com comp.lang.ada:16116 Date: 2010-11-02T10:38:23+01:00 List-Id: Le 01/11/2010 00:27, Yannick Duchêne (Hibou57) a écrit : > This recall me a similar thing I get a little long time ago. I wanted to > define a String type which I expected to hide the one of Standard, but > always failed. I asked about it on a forum after I've checked the > reference manual that time. I was thinking visibility rules was so that > I was allowed to hide something from Standard, did not found anything > stating the opposite, and finally never get an answer to this old question. Standard is just the parent package of every compilation unit, and there is no problem in *hiding* things declared in Standard with locally declared in identifiers, regular visibility rules apply. However, what confuses people is that use clauses are weaker than direct visibility. Therefore, if your "string" type is defined in package P and you "use P;", the String you get is Standard.String (directly visible), not P.String (use-visible). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a déménagé / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00