comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Question[s] about aliased extended return.
Date: Fri, 9 Nov 2012 17:52:43 -0800 (PST)
Date: 2012-11-09T17:52:43-08:00	[thread overview]
Message-ID: <3f8ba99f-015f-4567-8d31-6c711beb58c4@googlegroups.com> (raw)
In-Reply-To: <k7k9es$5nd$1@dont-email.me>

On Friday, November 9, 2012 6:08:46 PM UTC-7, Jeffrey Carter wrote:
> On 11/09/2012 12:42 PM, Shark8 wrote:
> 
> The extended return exists for build-in-place results of limited types. There's 
> really no reason to use it for other types.

Really? I thought it was quite useful for initializing things too:

Type Matrix is Array(Positive Range <>, Positive Range <>) of Float;

Type Identity(Size: Positive) return Matrix is
begin
  Return Result : Matrix(1..size, 1..size):= (others => 0.0) do
    For index in Matrix'Range(1) loop
      Result(Index, Index):= 1.0;
    end loop;
  End return;
end;

But I guess that's fairly related to build-in-place; the only difference being it's not limited.



  reply	other threads:[~2012-11-10  1:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02 15:55 Question[s] about aliased extended return Shark8
2012-11-09  0:43 ` Randy Brukardt
2012-11-09  3:40   ` Yannick Duchêne (Hibou57)
2012-11-10  7:34     ` Randy Brukardt
2012-11-09 19:42   ` Shark8
2012-11-09 20:53     ` sbelmont700
2012-11-09 21:44       ` Yannick Duchêne (Hibou57)
2012-11-09 22:04         ` sbelmont700
2012-11-09 22:56           ` Shark8
2012-11-09 22:54         ` Shark8
2012-11-10  7:27           ` Randy Brukardt
2012-11-10 16:08             ` Shark8
2012-11-10  1:08     ` Jeffrey Carter
2012-11-10  1:52       ` Shark8 [this message]
2012-11-10  2:17         ` Yannick Duchêne (Hibou57)
2012-11-10 10:59         ` Bill Findlay
replies disabled

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