comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Initialization of Arrays in Ada
Date: Wed, 24 Feb 2010 19:01:17 -0500
Date: 2010-02-24T19:01:17-05:00	[thread overview]
Message-ID: <wccljei6v5e.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: hm4732$7f6$1@tornado.tornevall.net

"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> writes:

> 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.

Right.  And you might want to create an empty array that goes
from 'First to 'First-1, which causes trouble with Integer.
It's usually better to use "Positive range <>",
or sometimes "Natural range <>", rather than
"Integer range <>".

- Bob



      parent reply	other threads:[~2010-02-25  0:01 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
2010-02-25  0:01     ` Robert A Duff [this message]
replies disabled

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