comp.lang.ada
 help / color / mirror / Atom feed
From: kst@sd.aonix.com (Keith Thompson)
Subject: Re: [Q] Problem with Array Concatenation?
Date: 1997/07/13
Date: 1997-07-13T00:00:00+00:00	[thread overview]
Message-ID: <EDA6sM.E0s@thomsoft.com> (raw)
In-Reply-To: ED611s.5yM.0.-s@inmet.camb.inmet.com



In <ED611s.5yM.0.-s@inmet.camb.inmet.com> stt@houdini.camb.inmet.com (Tucker Taft) writes:
> 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.

If Ada 95 hadn't restricted the 'Base attribute to apply only to
scalar subtypes, you could declare:

    subtype Slided is AT'Base (1 .. 50);
    -- or Slid, if you prefer

(Some, but not all, Ada 95 compilers do support this.)

Of course, there's also the minor problem that AT is a reserved word.

-- 
Keith Thompson (The_Other_Keith) kst@sd.aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
5040 Shoreham Place, San Diego, CA, USA, 92122-5989
"Zathras warn Zathras, but Zathras never listen to Zathras." -- Zathras




  parent reply	other threads:[~1997-07-13  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
1997-07-11  0:00     ` Matthew Heaney
1997-07-13  0:00     ` Keith Thompson [this message]
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