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-Thread: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r10g2000yqa.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: unsigned type Date: Mon, 29 Jun 2009 03:10:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: <19faf5c6-1cce-4958-a308-bac61b6ff0eb@r10g2000yqa.googlegroups.com> References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <36286c5a-99f0-4ed9-8ef0-11d7af230216@e21g2000yqb.googlegroups.com> NNTP-Posting-Host: 20.133.0.8 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1246270231 26216 127.0.0.1 (29 Jun 2009 10:10:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Jun 2009 10:10:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r10g2000yqa.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6703 Date: 2009-06-29T03:10:31-07:00 List-Id: On Jun 29, 9:54=A0am, "Dmitry A. Kazakov" wrote: > On Mon, 29 Jun 2009 01:42:31 -0700 (PDT), Martin wrote: > > On Jun 29, 12:08=A0am, a...@anon.org (anon) wrote: > >> And as for Natural, well, that is the definition of a String's index a= nd in most > >> cases you use Naturals in "for loop' statements. > > > Why would you do that? > > > If you iterating over an array object (e.g. a String), you should use > > 'Range, e.g. > > > =A0 =A0for I in My_Array'Range loop > > =A0 =A0 =A0 -- whatever > > =A0 =A0end loop; > > Exactly. However there are cases like copying element of one array into > another, when you have to specify the index type explicitly. I always > wished an attribute Index, which for arrays would yield the index subtype > of the array: > > =A0 =A0Index : A'Index; > > Another issue is shifted views of arrays. E.g. when you get two arrays A > and B, you could bring them to a coherent index range. True but that hardly fits the billing of "most cases" cited by 'anon'... Cheers -- Martin