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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: how to copy complete column (or row) of matrix to another? Date: Tue, 5 Sep 2017 17:45:53 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Tue, 5 Sep 2017 22:45:54 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="14972"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:47940 Date: 2017-09-05T17:45:53-05:00 List-Id: "Nasser M. Abbasi" wrote in message news:oolo0a$1djr$1@gioia.aioe.org... >I have not programmed in Ada for long time. I forgot now if > Ada supports copying whole column or whole row of 2D matrix > in one operation or not? No, that's not supported. It would be a distributed overhead to allow (that is, it would make all 2D operations slower), as the components of a slice would not necessarily be contiguous. In some cases, it makes more sense to declare a 1D array of a 1D array. Then you can slice the arrays. (That wouldn't make much sense for a true matrix; that's not something I use much, so most of my types tend to be arrays of arrays.) ... > I see old thread that slicing is not allowed for matrix? > > https://groups.google.com/forum/#!topic/comp.lang.ada/vwPXMabvUR8 > "Copying rows in a two dimensional array." > > Is this the reason for the error I get or Am I doing something > silly in the above? Yup. (Both statements are true. ;-) Randy.