comp.lang.ada
 help / color / mirror / Atom feed
From: firth@sei.cmu.edu (Robert Firth)
Subject: Re: 2nd follow-up to my previous posting (Re: RM question concerning types)
Date: Tue, 24-Nov-87 08:19:56 EST	[thread overview]
Date: Tue Nov 24 08:19:56 1987
Message-ID: <3358@aw.sei.cmu.edu> (raw)
In-Reply-To: 23@dim.sm.unisys.com

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.

      reply	other threads:[~1987-11-24 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <21@dim.sm.unisys.com>
1987-11-21  0:46 ` Follow-up to my original posting (Re: RM question concerning types) Steven Holtsberg
1987-11-23 19:18   ` Follow-up to my original posting (R stt
1987-11-24  1:46   ` 2nd follow-up to my previous posting (Re: RM question concerning types) Steven Holtsberg
1987-11-24 13:19     ` Robert Firth [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox