comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <no.spam@no.spam.com>
Subject: Re: creating an array
Date: Wed, 15 Feb 2006 08:42:09 +0100
Date: 2006-02-15T08:42:09+01:00	[thread overview]
Message-ID: <dsum0h$nnd$1@sunnews.cern.ch> (raw)
In-Reply-To: <ldbke401hna0.1ctkkgjler8xb.dlg@40tude.net>

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/



  parent reply	other threads:[~2006-02-15  7:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14  6:06 creating an array isaac2004
2006-02-14 13:59 ` jimmaureenrogers
2006-02-14 15:20   ` isaac2004
2006-02-14 18:44     ` jimmaureenrogers
2006-02-14 19:25 ` Björn Persson
2006-02-14 19:39   ` Dmitry A. Kazakov
2006-02-14 21:14     ` isaac2004
2006-02-14 22:17       ` jimmaureenrogers
2006-02-14 22:30         ` isaac2004
2006-02-14 22:45         ` Ludovic Brenta
2006-02-14 22:54           ` isaac2004
2006-02-14 23:10             ` Ludovic Brenta
2006-02-14 23:37               ` isaac2004
2006-02-15  7:45                 ` Anders Wirzenius
2006-02-15 20:44                   ` Björn Persson
2006-02-16  6:59                     ` Anders Wirzenius
2006-02-15 21:53                 ` Ludovic Brenta
2006-02-15 23:29                   ` isaac2004
2006-02-16  3:09                     ` jimmaureenrogers
2006-02-15  7:42     ` Maciej Sobczak [this message]
2006-02-15 10:37       ` Jean-Pierre Rosen
2006-02-15 13:30       ` Dmitry A. Kazakov
2006-02-15 16:23         ` isaac2004
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox