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=0.7 required=5.0 tests=BAYES_00,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!uunet!husc6!bbn!rochester!PT.CS.CMU.EDU!sei!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.lang.ada Subject: Re: 2nd follow-up to my previous posting (Re: RM question concerning types) Message-ID: <3358@aw.sei.cmu.edu> Date: Tue, 24-Nov-87 08:19:56 EST Article-I.D.: aw.3358 Posted: Tue Nov 24 08:19:56 1987 Date-Received: Fri, 27-Nov-87 22:20:25 EST References: <21@dim.sm.unisys.com> <22@dim.sm.unisys.com> <23@dim.sm.unisys.com> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE) Organization: Carnegie-Mellon University, SEI, Pgh, Pa List-Id: In article <23@dim.sm.unisys.com> steve@dim.sm.unisys.com (Steven Holtsberg) writes: >Now, the only question is why do they allow declaration of such static subtypes? >(E.g., type T is range l..r instead of subtype T is integer_type range l..r). >The only reason I can think of is to allow the particular implementation to >choose which base type to use--which of course, leads to non-portable code. Sorry if the above was a typo, Steven, but the intent of a declaration such as type INDEX is range 0 .. 100_000; is to allow PORTABLE code. The compiler is required to map this onto an intrinsic type that has at least the required range. For example, on a VAX-11 the base type will be "longword", on an MC68020 it will be "long", and so on. The declaration can therefore be moved unchanged from one machine to another. Contrast this with the trouible the C folks in the nearby newsgroup have with their "int" of who knows what size.