comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Initialization of Arrays in Ada
Date: Wed, 24 Feb 2010 17:50:25 -0600
Date: 2010-02-24T17:50:25-06:00	[thread overview]
Message-ID: <hm4e02$ced$1@munin.nbi.dk> (raw)
In-Reply-To: hm4732$7f6$1@tornado.tornevall.net

"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> wrote in message 
news:hm4732$7f6$1@tornado.tornevall.net...
> sjw wrote:
>>
>> but then the indices of Arr are -2147483648 .. -2147483647 (ie, start
>> at Integer'First. Not sure if this is mandated behaviour -- probably
>
> The indices start at Integer'First. The exact value of Integer'First 
> depends on the compiler. You cannot count on the range of Integer being 
> greater than a 16-bit signed integer.
>
> This is mandated: ARM 4.3.3(26): "[The bounds of the index range of an 
> array_aggregate are determined as follows:] For a 
> positional_array_aggregate ..., the lower bound is ... that of the 
> corresponding index subtype ..."

Right. There is a reason that String is defined:

     array (Positive range <>) of Character;

                                        Randy.





  reply	other threads:[~2010-02-24 23:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 21:11 Initialization of Arrays in Ada Ina Drescher
2010-02-24 21:30 ` Ludovic Brenta
2010-02-24 21:30 ` sjw
2010-02-24 21:52   ` Jeffrey R. Carter
2010-02-24 23:50     ` Randy Brukardt [this message]
2010-02-25  0:01     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox