comp.lang.ada
 help / color / mirror / Atom feed
From: Stefan.Lucks@uni-weimar.de
Subject: Re: improvements for multidimensional arrays ?
Date: Thu, 17 May 2018 10:06:11 +0200
Date: 2018-05-17T10:06:11+02:00	[thread overview]
Message-ID: <alpine.DEB.2.21.1805170959290.5177@hexenstieg> (raw)
In-Reply-To: <a7b818c4-235c-4ce5-a914-6e5b157337a6@googlegroups.com>

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

On Wed, 16 May 2018, Mehdi Saada wrote:

> Is it likely or not that we see some improvements over multidimensional arrays ?

Why?

> But it should be allowed to provide a proper initial value at initialization.
> Imagine a matrix whose first row and first column's elements are all at zero.

What is wrong with the code below?

    type Matrix is array (Natural range <>, Natural range <>) of Natural;

    M1: Matrix(1 .. 10, 1 .. 5) :=
      (1      => (others => 0),        -- first row 0
       others => (1 => 0, others => 1) -- first column in other rows 0,
 	                              -- all other entries 1
      );

    M2: Matrix(1 .. 10, 1 .. 5) :=
      (1 =>      (others => 0),         -- first row 0
       others => (1 => 0, others => <>) -- first column in other rows 0,
 	                               -- all other entries left undefined
      );

--------  I  love  the  taste  of  Cryptanalysis  in  the morning!  --------
www.uni-weimar.de/de/medien/professuren/mediensicherheit/people/stefan-lucks
----Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universität Weimar, Germany----

  reply	other threads:[~2018-05-17  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  0:32 improvements for multidimensional arrays ? Mehdi Saada
2018-05-17  8:06 ` Stefan.Lucks [this message]
2018-05-17 11:32   ` Mehdi Saada
2018-05-17 16:38     ` Jeffrey R. Carter
2018-05-17 17:21       ` Mehdi Saada
replies disabled

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