From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: basic question on adding 2 arrays
Date: Sun, 13 Jul 2014 03:10:47 -0700 (PDT)
Date: 2014-07-13T03:10:47-07:00 [thread overview]
Message-ID: <76d7dbf2-e6b8-4304-b90a-c29a5d129156@googlegroups.com> (raw)
In-Reply-To: <lpt98m$3q5$1@dont-email.me>
On Sunday, July 13, 2014 8:33:57 AM UTC+2, Jeffrey Carter wrote:
> function "+" (Left : in Base_Grid; Right : in Base_Grid) return Base_Grid with
> Pre => Left'Length = Right'Length;
>
> Next (Next'First + 1 .. Next'Last - 1) :=
> Next (Next'First .. Next'Last - 2) +
> Next (Next'First + 2 .. Next'Last);
OK, one can do this, but is it better than Nasser's?
> for i in 2..next'length-1 loop
> next(i):= now(i-1)+now(i+1);
> end loop;
next prev parent reply other threads:[~2014-07-13 10:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-13 3:34 basic question on adding 2 arrays Nasser M. Abbasi
2014-07-13 4:09 ` Nasser M. Abbasi
2014-07-13 4:35 ` Nasser M. Abbasi
2014-07-13 6:33 ` Jeffrey Carter
2014-07-13 10:10 ` AdaMagica [this message]
2014-07-13 16:25 ` Jacob Sparre Andersen
2014-07-13 21:53 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox