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: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Learning Ada Date: Mon, 06 Jul 2009 09:47:16 +0200 Organization: Adalog Message-ID: References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <62792744-daca-437b-bdee-4b8a21f7ce27@j32g2000yqh.googlegroups.com> <82oq45tj2uu26u6ecsgq70bsjskr9dvghr@4ax.com> <878wj61bpo.fsf_-_@nbi.dk> <4a4f6cce$0$31869$9b4e6d93@newsspool3.arcor-online.net> <4Aa4m.421894$4m1.207252@bgtnsc05-news.ops.worldnet.att.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1246857027 25656 195.25.228.57 (6 Jul 2009 05:10:27 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Mon, 6 Jul 2009 05:10:27 +0000 (UTC) User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:6853 Date: 2009-07-06T09:47:16+02:00 List-Id: AdaMagica a �crit : > Oh my dear anon, you are so wrong again. > >> package STANDARD is >> >> -- The universal type universal_integer is predefined. >> >> type INTEGER is range - 2 ** 63 .. ( 2 ** 63 ) - 1 ; >> >> end STANDARD; > > You do *not* redefine Standard with this declaration, you simply hide > it. > > with Standard; > > procedure Temp is -- Here you will get into troubled water. > > X: Integer; -- this is still the integer from the predefined > package Standard > Y: STANDARD.Integer; -- this is your INTEGER > > use Standard; > > Z: Integer := 2; -- oh lord, what's this now? > > -- I'm not sure and I'm reluctant to do the RM exegesis to find out. > I *guess* it's your INTEGER; No, it's the one from the real Standard. The rule is simple: "use" is weak. It comes into play only if nothing gets in the way (like a similar name that is directly visible, or declared in another used package). The regular Standard is always /directly/ visible, therefore a use clause never brings something in front of something from the regular Standard. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr