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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5d624451bcaff335 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!postnews.google.com!j9g2000prh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Null Range in Unconstrasined Array Date: Tue, 1 Sep 2009 07:50:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: <76a9c14b-c573-4fd4-bbd8-7ab3bd078d79@j9g2000prh.googlegroups.com> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1251816648 19744 127.0.0.1 (1 Sep 2009 14:50:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Sep 2009 14:50:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j9g2000prh.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8101 Date: 2009-09-01T07:50:48-07:00 List-Id: On Aug 31, 6:28=A0pm, Rick 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 > =93L .. R=94. 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