comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: [Q] Problem with Array Concatenation?
Date: 1997/07/11
Date: 1997-07-11T00:00:00+00:00	[thread overview]
Message-ID: <ED611s.5yM.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: mheaney-ya023680001007971857360001@news.ni.net


Matthew Heaney (mheaney@ni.net) wrote:
: ...
: There's another way to make the fix, by manually sliding the initial substring:

: declare
:    type AT is array (Positive range 1 .. 100) of Integer;

:    SA : AT;
:    DA : AT;
:    subtype Slided is AT (1 .. 50);

Now *this* is not legal Ada (83 or 95).  You can't re-constrain
a constrained array (sub)type.

: begin
:    ...
:    DA := Slided (SA (51 .. 100)) & SA (1 .. 50);
: end;

: In Ada 83 the 2nd substring will be automatically slided.

Only if you can convince the compiler to accept the declaration
for "Slided" (sic).

By the way, I prefer the word "slid" ;-).

: - Matt

: --------------------------------------------------------------------
: Matthew Heaney
: Software Development Consultant
: <mailto:matthew_heaney@acm.org>
: (818) 985-1271

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




  reply	other threads:[~1997-07-11  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-08  0:00 [Q] Problem with Array Concatenation? John McCabe
1997-07-08  0:00 ` Michael Quinn
1997-07-09  0:00 ` Tucker Taft
1997-07-10  0:00 ` Matthew Heaney
1997-07-11  0:00   ` Tucker Taft [this message]
1997-07-11  0:00     ` Matthew Heaney
1997-07-13  0:00     ` Keith Thompson
1997-07-13  0:00     ` Robert A Duff
1997-07-13  0:00       ` John McCabe
replies disabled

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