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 Path: g2news2.google.com!postnews.google.com!d32g2000yqh.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Learning Ada Date: Sun, 5 Jul 2009 23:18:41 -0700 (PDT) Organization: http://groups.google.com 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: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1246861121 17959 127.0.0.1 (6 Jul 2009 06:18:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 6 Jul 2009 06:18:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d32g2000yqh.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.3.4555) Xref: g2news2.google.com comp.lang.ada:6850 Date: 2009-07-05T23:18:41-07:00 List-Id: Oh my dear anon, you are so wrong again. > package STANDARD is > > =A0 -- The universal type universal_integer is predefined. =A0 > > =A0 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 :=3D 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; I: Integer :=3D Z**3; -- subtype of 3 is still the Integer defined in -- the predefined Standard you've hidden J: Integer :=3D Z**Z; -- This should then be illegal because the subtype of the right operand of ** -- must be the one from the hidden Standard. end Temp; Point is: You cannot redefine Standard! Full stop. I invite you to find the relevant paragraphs in the RM which state what will happen when you define a package named Standard. And please be careful to not mix up a subtype and the type of the subtype and the type of numeric literals. They are all different.