comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Eachus <rieachus@comcast.net>
Subject: Re: Arrays in Ada 2020
Date: Tue, 20 Jun 2017 06:33:29 -0700 (PDT)
Date: 2017-06-20T06:33:29-07:00	[thread overview]
Message-ID: <16dbf4e6-0dc4-453e-9c0f-7c19db096dfb@googlegroups.com> (raw)
In-Reply-To: <lya8559hmo.fsf@pushface.org>

On Sunday, June 18, 2017 at 4:15:58 PM UTC-4, Simon Wright wrote:
> Robert Eachus <rieachus@comcast.net> writes:
> 
> >    function Unit_Matrix (Order           : Positive;
> >                          First_1, First_2 : Integer := 1)
> >                                             return Real_Matrix is
> >       Result: Real_Matrix(First_1..First_1+Order,
> >                      First_2..First_2+Order) := (others => 
> >                                                 (others => 0.0));
> >    begin
> >      for I in First_1..First_1+Order loop
> >         Result(I, I-First_1+First_2) := 1.0;
> >      end loop;
> >      return Result;
> >    end Unit_Matrix;
> 
> Isn't that 1 larger in each dimension than it should be?

Oops! Yes.

  reply	other threads:[~2017-06-20 13:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 11:47 Arrays in Ada 2012 Anatoly Chernyshev
2017-06-06 12:17 ` Dmitry A. Kazakov
2017-06-06 13:17   ` Simon Wright
2017-06-06 13:57     ` Dmitry A. Kazakov
2017-06-06 21:59       ` Simon Wright
2017-06-06 13:19 ` AdaMagica
2017-06-06 20:56   ` Randy Brukardt
2017-06-07  7:06     ` Dmitry A. Kazakov
2017-06-07 11:47       ` Anatoly Chernyshev
2017-06-07 12:15         ` Dmitry A. Kazakov
2017-06-08  0:55         ` Randy Brukardt
2017-06-08  0:51       ` Randy Brukardt
2017-06-08  7:07         ` Dmitry A. Kazakov
2017-06-09  3:23           ` Randy Brukardt
2017-06-18  2:14 ` Arrays in Ada 2020 Ivan Levashev
2017-06-18  3:00   ` Nasser M. Abbasi
2017-06-18 12:06     ` Robert Eachus
2017-06-18 20:15       ` Simon Wright
2017-06-20 13:33         ` Robert Eachus [this message]
2017-06-19  6:36       ` Ivan Levashev
2017-06-19 12:06         ` AdaMagica
2017-06-23  1:17           ` Randy Brukardt
2017-06-18 20:15     ` Pascal Obry
replies disabled

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