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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: improvements for multidimensional arrays ? Date: Thu, 17 May 2018 18:38:15 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <63c877c7-f122-41be-a55e-45aca00f90ad@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 17 May 2018 16:38:15 -0000 (UTC) Injection-Info: h2725194.stratoserver.net; posting-host="4b6756fbfa3b187bdbd8ff0caa44916a"; logging-data="31313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hcNgzidqZXgRCMnm2qK0SK3REEjjqlQg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Cancel-Lock: sha1:IvL8mY4CiD1gyV2/NIA+GFnF8Kc= In-Reply-To: <63c877c7-f122-41be-a55e-45aca00f90ad@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:52392 Date: 2018-05-17T18:38:15+02:00 List-Id: On 05/17/2018 01:32 PM, Mehdi Saada wrote: > > That said, I couldn't find anywhere if a multidim array can do something an array of array simply can not. Is it only some kind of syntax sugar then ? A multidimensional array type can be unconstrained in all dimensions. An array of arrays can only be unconstrained in the 1st dimension. type C2D is array (Positive range <>, Positive range <>) of Character; subtype S10 is String (1 .. 10); type SL is array (Positive range <>) of S10; With an array of arrays, the components are arrays and may be used as such. V : SL (1 .. 10); ... Ada.Text_IO.Put_Line (Item => V (5) ); -- Jeff Carter "He didn't get that nose from playing ping-pong." Never Give a Sucker an Even Break 110