From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bf03d731a6ef511f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news.glorb.com!weretis.net!feeder2.news.weretis.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Copying rows in a two dimensional array. Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4b6637a1$0$4586$4d3efbfe@news.sover.net> Date: Thu, 4 Feb 2010 10:10:06 +0100 Message-ID: <1fmfi9p68s4an$.1q50he325y45g.dlg@40tude.net> NNTP-Posting-Date: 04 Feb 2010 10:10:06 CET NNTP-Posting-Host: b6795aee.newsspool1.arcor-online.net X-Trace: DXC=SKXC?KV?goXI?44J>Z[:RQic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgR[kA=fVc`CZ_[6LHn;2LCV^7enW;^6ZC`TIXm65S@:3>_Bj_n4Jof]kP X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:8878 Date: 2010-02-04T10:10:06+01:00 List-Id: On Wed, 3 Feb 2010 20:13:20 -0800 (PST), Hibou57 (Yannick Duch�ne) wrote: > On 1 f�v, 03:11, "Peter C. Chapin" wrote: >> Apparently the component type of an array needs to be fully constrained (which >> again makes sense) yet I don't know the size > That's what generics are made for. > But you will have a single matrix type of a fixed size. Generics per design are incapable to express that the thing is variable. You cannot make a generic variable-dimension matrix, a generic string, or for that matter even a generic number: generic Value : WHAT? package Integer is ... end Integer; That does not work. > I you don't want a fixed size type, the best I will think about, would > be to create an abstract matrix type which will be implemented on a > one dimensional array. You could use slice in the implementation. This does not work either, I mean at the user interface level, because slice does not have a type. In Ada types system you cannot express "the subtype S is a vector of the type M". Therefore making it abstract types you will loose most of the comfort built-in arrays offer. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de