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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.osn.de!diablo1.news.osn.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: unsigned type Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <36286c5a-99f0-4ed9-8ef0-11d7af230216@e21g2000yqb.googlegroups.com> Date: Mon, 29 Jun 2009 10:54:54 +0200 Message-ID: NNTP-Posting-Date: 29 Jun 2009 10:51:41 CEST NNTP-Posting-Host: 37297213.newsspool1.arcor-online.net X-Trace: DXC=iD5bW1FB4?J0YVY]kmLTlDic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbI?e[kjDe[CeHDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgB[EZ][Wf_L7F X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6698 Date: 2009-06-29T10:51:41+02:00 List-Id: On Mon, 29 Jun 2009 01:42:31 -0700 (PDT), Martin wrote: > On Jun 29, 12:08�am, a...@anon.org (anon) wrote: >> And as for Natural, well, that is the definition of a String's index and 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. > > for I in My_Array'Range loop > -- whatever > end 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: Index : 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. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de