comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Returning ranges from a function (was: How to loop (elegant) throug a vector ?)
Date: Sun, 22 Jun 2008 14:06:36 -0700 (PDT)
Date: 2008-06-22T14:06:36-07:00	[thread overview]
Message-ID: <37e7c45f-7c3d-464a-8a66-f5911443ec34@d45g2000hsc.googlegroups.com> (raw)
In-Reply-To: 20080622204713.2127db4f@cube.tz.axivion.com

On 22 Cze, 20:47, Stefan Bellon <bel...@software-erosion.org> wrote:

> You need to store the two words for First and Last (or First and
> Length). And indeed, this is what GNAT does. The 'Size of the array
> object returned is two words in size.

Now I have noticed the for Empty_Component'Size use 0 part. Sorry for
the confusion, but see below for more. :-)

> The question is
> whether this optimisation (for 'Size use 0) can always be guaranteed.

I have a better question: is it *legal*?

Consider 3.6/13:

"A one-dimensional array has a distinct component for each possible
index value."

What does it mean - "distinct"? Doesn't it exclude overlays?

What about "independent addressability" from 13.3? The text is a bit
dense, but I conclude that the 'Size attribute does not have to be
strictly obeyed by the implementation.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com



  reply	other threads:[~2008-06-22 21:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20 13:19 How to loop (elegant) throug a vector ? Reinert Korsnes
2008-06-20 14:49 ` Pascal Obry
2008-06-20 17:12 ` Returning ranges from a function (was: How to loop (elegant) throug a vector ?) Stefan Bellon
2008-06-22 14:01   ` Maciej Sobczak
2008-06-22 18:47     ` Stefan Bellon
2008-06-22 21:06       ` Maciej Sobczak [this message]
2008-06-23  9:47         ` Stefan Bellon
2008-06-23 12:06           ` Maciej Sobczak
2008-06-23 12:28             ` christoph.grein
2008-06-20 19:21 ` How to loop (elegant) throug a vector ? Jeffrey R. Carter
2008-06-20 19:48   ` Reinert Korsnes
2008-06-20 23:25     ` Jeffrey R. Carter
2008-06-23 17:14     ` Matthew Heaney
2008-06-23 17:11   ` Matthew Heaney
2008-06-23 17:08 ` Matthew Heaney
replies disabled

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