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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.17.140 with SMTP id s12mr2057089qaa.3.1363278161444; Thu, 14 Mar 2013 09:22:41 -0700 (PDT) X-Received: by 10.50.151.205 with SMTP id us13mr3414333igb.2.1363278161266; Thu, 14 Mar 2013 09:22:41 -0700 (PDT) Path: k8ni188qas.0!nntp.google.com!dd2no690240qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 14 Mar 2013 09:22:40 -0700 (PDT) In-Reply-To: <18r2kop6fyozu.tctrjnghfxqs.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.20.190.126 References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <1xqmd3386hvns.1og1uql2cgnuf$.dlg@40tude.net> <5140b812$0$6575$9b4e6d93@newsspool3.arcor-online.net> <5140f1ad$0$6634$9b4e6d93@newsspool2.arcor-online.net> <7jct0noryc1v.1rnj5kkzx6m35.dlg@40tude.net> <5141c499$0$6642$9b4e6d93@newsspool2.arcor-online.net> <18r2kop6fyozu.tctrjnghfxqs.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9fdb6a77-aea8-4cb6-aebd-2dd7d3baaefa@googlegroups.com> Subject: Re: Is this expected behavior or not From: Shark8 Cc: mailbox@dmitry-kazakov.de Injection-Date: Thu, 14 Mar 2013 16:22:41 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-03-14T09:22:40-07:00 List-Id: On Thursday, March 14, 2013 8:26:56 AM UTC-6, Dmitry A. Kazakov wrote: > On Thu, 14 Mar 2013 13:37:44 +0100, Georg Bauhaus wrote: >=20 > >> We don't talk about Positive'Base. We do about Positive. > >=20 > > Positive'Succ does *not* declare parameters whose subtype is Positive. >=20 > Surely it does. Proof: >=20 > X : Positive :=3D 1; > Y : Positive :=3D Positive'Succ (X); >=20 > Either Ada is untyped or else Positive'Succ is effectively defined on > Positive and returns Positive. Objection! The LRM says this about Types and Subtypes in 3.2 (8/2):=20 A subtype of a given type is a combination of the type, a constraint on val= ues of the type, and certain attributes specific to the subtype. The given = type is called the type of the subtype. Similarly, the associated constrain= t is called the constraint of the subtype. The set of values of a subtype c= onsists of the values of its type that satisfy its constraint and any exclu= sion of the null value. Such values belong to the subtype. So then the TYPE of Positive is it's base, Integer (even if declared as a s= ubtype of Natural, precisely because the TYPE of natural would also be Inte= ger). If the parameters and results of 'Succ & 'Pred are of 'Base then they= must obviously be able to take parameters of the given [SUB]TYPE because i= t's TYPE *is* 'Base.