From: Adam Beneschan <adam@irvine.com>
Subject: Re: Null Range in Unconstrasined Array
Date: Tue, 1 Sep 2009 07:50:48 -0700 (PDT)
Date: 2009-09-01T07:50:48-07:00 [thread overview]
Message-ID: <76a9c14b-c573-4fd4-bbd8-7ab3bd078d79@j9g2000prh.googlegroups.com> (raw)
In-Reply-To: f237670b-ade0-461f-9d02-5eff803e91bc@p10g2000prm.googlegroups.com
On Aug 31, 6:28 pm, Rick <rickdu...@gmail.com> wrote:
> If I have an unconstrained array type 'My_Array_Type' and declare an
> instance of it as:
>
> My_Array : My_Array_Type (1 .. 0);
>
> then the LRM tells me it is a null range:
>
> 3.5 (4): A range with lower bound L and upper bound R is described by
> “L .. R”. If R is less than L, then the range is a null range, and
> specifies an empty set of values.
>
> What, exactly, is My_Array (forgive the language) pointing to?
> Is any memory allocated to My_Array?
Most likely, no. Randy gave a reason why a compiler might want to
allocate a little bit of space for the array; but even if it does,
it's memory that will never be used. Any attempt to refer to My_Array
(X), no matter what X is, will raise Constraint_Error.
-- Adam
next prev parent reply other threads:[~2009-09-01 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 1:28 Null Range in Unconstrasined Array Rick
2009-09-01 3:11 ` Randy Brukardt
2009-09-01 14:50 ` Adam Beneschan [this message]
2009-09-01 15:34 ` Robert A Duff
2009-09-06 12:11 ` Peter C. Chapin
2009-09-06 12:41 ` Robert A Duff
2009-09-08 17:54 ` Adam Beneschan
2009-09-09 8:35 ` Stephen Leake
2009-09-09 13:00 ` Robert A Duff
2009-09-09 19:22 ` sjw
2009-09-10 23:24 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox