comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
Subject: Re: Bounds of Slice's return value
Date: 19 Jan 2002 10:45:23 +0000
Date: 2002-01-19T10:45:23+00:00	[thread overview]
Message-ID: <87adva7h6k.fsf@chiark.greenend.org.uk> (raw)
In-Reply-To: 3C48CAC8.AF186C93@acm.org

Jeffrey Carter <jrcarter@acm.org> writes:

> Matthew Woodcraft wrote:
> > 
> > Ada.Strings.Unbounded.Slice returns a Standard.String.
> > 
> > Am I guaranteed anything about the bounds of this string?
> 
> As you noticed, the ARM is silent about this. The ARG is working towards
> (if they haven't already completed) an AI stating that the bounds should
> be the same as the indices passed to Slice, to correspond with the
> bounds of a slice of a String.

Thanks. I'm glad they're nailing it down; it seems to be a needless
source of hard-to-spot errors, otherwise.


> GNAT noticeably does not do this in the most recent public version
> (3.13p), though I believe this has been changed in more recent (as yet
> non-public) versions.

Indeed, I came across this because one of my unit tests failed when I
tried compiling with cvs gcc.

-M-



  reply	other threads:[~2002-01-19 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-18 23:16 Bounds of Slice's return value Matthew Woodcraft
2002-01-19  1:24 ` Jeffrey Carter
2002-01-19 10:45   ` Matthew Woodcraft [this message]
2002-01-19 14:32     ` Robert A Duff
2002-01-19 17:19       ` Matthew Woodcraft
2002-01-21 20:19 ` 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