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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: How to get a 2D arrays range? Date: Sat, 21 Nov 2015 22:02:50 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <75e0a3fe-a4fc-43e5-a773-06d7bb553b38@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sun, 22 Nov 2015 05:00:31 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="30458"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s7YfoRfZZzHDRPk7CgYOOAFZNBHVSxuM=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <75e0a3fe-a4fc-43e5-a773-06d7bb553b38@googlegroups.com> Cancel-Lock: sha1:dAgT49MxjmE6Xy5JBOOSPE0etZk= Xref: news.eternal-september.org comp.lang.ada:28488 Date: 2015-11-21T22:02:50-07:00 List-Id: On 11/21/2015 08:31 PM, John Smith wrote: > > Of the nested for-loop, where I explicitly call out 1 .. 10, I'd like to specify > the range more dynamically. How can I do this? In ARM K.2, Language-Defined Attributes, we find 185/1 A'Range For a prefix A that is of an array type (after any implicit dereference), or denotes a constrained array subtype: 186 A'Range is equivalent to the range A'First .. A'Last, except that the prefix A is only evaluated once. See 3.6.2. and 189/1 A'Range(N) For a prefix A that is of an array type (after any implicit dereference), or denotes a constrained array subtype: 190 A'Range(N) is equivalent to the range A'First(N) .. A'Last(N), except that the prefix A is only evaluated once. See 3.6.2. http://www.adaic.org/resources/add_content/standards/12rm/html/RM-K-2.html -- Jeff Carter "If you think you got a nasty taunting this time, you ain't heard nothing yet!" Monty Python and the Holy Grail 23