From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a1691a2185bb3e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-19 02:45:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!newspeer.clara.net!news.clara.net!peernews!peer.cwci.net!news5-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail Sender: mjw@golux Newsgroups: comp.lang.ada Subject: Re: Bounds of Slice's return value References: <87bsfrcksf.fsf@chiark.greenend.org.uk> <3C48CAC8.AF186C93@acm.org> From: Matthew Woodcraft Message-ID: <87adva7h6k.fsf@chiark.greenend.org.uk> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 19 Jan 2002 10:45:23 +0000 NNTP-Posting-Host: 213.107.104.73 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1011437129 213.107.104.73 (Sat, 19 Jan 2002 10:45:29 GMT) NNTP-Posting-Date: Sat, 19 Jan 2002 10:45:29 GMT Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:19097 Date: 2002-01-19T10:45:23+00:00 List-Id: Jeffrey Carter 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-