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.2 required=5.0 tests=BAYES_00,FROM_DOMAIN_NOVOWEL, INVALID_DATE,MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!hplabs!sdcrdcf!markb From: markb@sdcrdcf.UUCP (Mark Biggar) Newsgroups: net.lang.ada Subject: Re: Another question about types and subypes Message-ID: <2957@sdcrdcf.UUCP> Date: Thu, 14-Aug-86 18:23:09 EDT Article-I.D.: sdcrdcf.2957 Posted: Thu Aug 14 18:23:09 1986 Date-Received: Fri, 15-Aug-86 06:38:13 EDT References: <2956@sdcrdcf.UUCP> Reply-To: markb@sdcrdcf.UUCP (Mark Biggar) Organization: System Development Corporation R&D, Santa Monica List-Id: In article <2956@sdcrdcf.UUCP> steve@sdcrdcf.UUCP (Steven Holtsberg) writes: > >On page 3-15, section 3.5.4, the ARM says: > >A type declaration of the form: > > type T is range L .. R; > >is, by definition equivalent to the following declarations: > > type is new predefined_integer_type; > subtype T is range (L) .. (R); > >It then goes on to refer to T as a _type_ : >"The elaboration of the declaration of an integer _type_ ...". >However, the "equivalent" pair of declarations given does >_not_ declare a new type named T, is declares an anonymous >type (integer_type) and a _subtype_ T. > >Are they lying, or are they just careless? No just pragmatic, They use T as the name of the type, even though it's really only a subtype, because there is no other name they can use. The LRM explisitly outlaws using T'BASE as the name of the type. Note also that subtypes are used to rename types as in: subtype FOO is BAR; After this there is no difference between FOO and BAR to the compiler. Mark Biggar {allegra,burdvax,cbosgd,hplabs,ihnp4,akgua,sdcsvax}!sdcrdcf!markb