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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,35edde140291c79e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.236.170 with SMTP id uv10mr7475746pbc.4.1335486540709; Thu, 26 Apr 2012 17:29:00 -0700 (PDT) Path: r9ni102445pbh.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: Can Ada iterate over Nd array? Date: Thu, 26 Apr 2012 20:28:58 -0400 Organization: A noiseless patient Spider Message-ID: References: <26754113.2767.1335431755764.JavaMail.geo-discussion-forums@vbki8> Mime-Version: 1.0 Injection-Date: Fri, 27 Apr 2012 00:29:00 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="5MNoRlpIAhOS/jy0qxZerw"; logging-data="9518"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/p/LXqeH6mVOr4CZpwrpw9" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Cancel-Lock: sha1:hFKGVGMSfB5p7OE6vOM5vVyg/zI= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-04-26T20:28:58-04:00 List-Id: On 04/26/2012 02:09 PM, Jeffrey Carter wrote: > On 04/26/2012 02:15 AM, gautier.de.montmollin@gmail.com wrote: >> >> We could make a poll here: which is the maximum number of array >> dimensions you ever used ? >> My answer: probably 5 or 6. > > I don't recall ever using more than 3. > > I don't think arrays with more than about 30 dimensions are going to be > possible with current technology: given only 2 index values/dimension, > that's 2 ** 30 components, or 1 GB if each component is a byte. Much > more than that and you won't be able to allocate the array. Even in the > foreseeable future it doesn't look as if a 100-dimension array will be > possible. 1000 dimensions is right out! > If what is desired is an "n-dimensional array" (i.e. n is a parameter of some sort - generic or procedure parameter), what are you going to do with it, even if you can iterate? How do you declare such a type? If it's to be used as a library to work on "n-dimensional arrays", how do you specify subroutine parameters? (Except as a raw memory address or equivalent.) -- --- BrianG 000 @[Google's email domain] .com