Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion unsigned type
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dmitry A. Kazakov  
View profile  
 More options Jun 29 2009, 4:54 am
Newsgroups: comp.lang.ada
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Mon, 29 Jun 2009 10:54:54 +0200
Local: Mon, Jun 29 2009 4:54 am
Subject: Re: unsigned type

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.