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,aa14979d20ba3045 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news2.euro.net!novso.com!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Mon, 11 May 2009 13:46:21 +0200 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Use aggregates (Was: Allocation question) References: <4a07fc7a$0$2855$ba620e4c@news.skynet.be> <87prefhq04.fsf@nbi.dk> In-Reply-To: <87prefhq04.fsf@nbi.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4a080ff7$0$2865$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 1990c410.news.skynet.be X-Trace: 1242042359 news.skynet.be 2865 87.65.150.40:58435 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:5757 Date: 2009-05-11T13:46:21+02:00 List-Id: Jacob Sparre Andersen wrote: > Olivier Scalbert wrote: > >> procedure Fill(Image: in out Image_T; Color: Color_T) is >> begin >> for x in Image'range(1) loop >> for y in Image'range(2) loop >> Image(x,y) := Color; >> end loop; >> end loop; >> end Fill; > > I would sugges that you rather wrote this: > > Image := (others => (others => Color)); > > It is a more precise expression of what (I guess) you want done, and > thus it gives the compiler more precise information to work with. > > Greetings, > > Jacob Yes you are right ! But I was so happy to use Image'range ! :-)