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: 103376,3f1374bc66d2dc03 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!kanaga.switch.ch!ezmp3.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: creating an array Date: Wed, 15 Feb 2006 08:42:09 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: <1139897171.996297.230070@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1139989329 24301 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060203 Red Hat/1.7.12-1.1.3.4 X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:2902 Date: 2006-02-15T08:42:09+01:00 List-Id: Dmitry A. Kazakov wrote: >>for Index in The_Array_Type'Range loop >> The_Array(Index) := The_Function; >>end loop; > > The_Array_Type := (others => The_Function); ^^^^^ Rather The_Array := ... But what's more important - could you point to a specific paragraph in AARM that guarantees that the two above are equivalent? I mean - is it guaranteed that (others=>The_Function) has the meaning of increasing order of indexes? Is is possible for the implementation to call The_Function just once and reuse its return value for all elements' assignments? 5.2 seems to be a relevant chapter, but I haven't found anything that would apply here. 4.3.3 does not help either. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/