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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,19924f2facf8443 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e53g2000hsa.googlegroups.com!not-for-mail From: amado.alves@gmail.com Newsgroups: comp.lang.ada Subject: Re: Larger matrices Date: Fri, 8 Aug 2008 02:59:56 -0700 (PDT) Organization: http://groups.google.com Message-ID: <13426f2d-0060-47f0-8139-09506383f648@e53g2000hsa.googlegroups.com> References: <40ed91c2-3dab-4994-9a7b-4032058f0671@56g2000hsm.googlegroups.com> <4899b545$0$20713$9b4e6d93@newsspool4.arcor-online.net> <96f76821-fc2a-4ec1-83e7-b7b9a5be0520@r66g2000hsg.googlegroups.com> <9cabee20-877a-4fdc-80f8-7746879331da@8g2000hse.googlegroups.com> <489a9675$0$20718$9b4e6d93@newsspool4.arcor-online.net> <75a339dd-969b-4c7a-8e89-7b640171bc2f@e53g2000hsa.googlegroups.com> NNTP-Posting-Host: 89.214.203.120 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1218189596 31960 127.0.0.1 (8 Aug 2008 09:59:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 8 Aug 2008 09:59:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e53g2000hsa.googlegroups.com; posting-host=89.214.203.120; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1534 Date: 2008-08-08T02:59:56-07:00 List-Id: > > And Ada got in the way: slicing restricted to one-dimensional arrays! > > Compared to other languages that have no slicing at all? There are languages better than Ada at array indexing, including slicing. If there aren't, there should be! A bidimensional array like the standard Real_Matrix should be compatible with a unidimensional array like Real_Vector. One row (or one column) of a matrix is a vector. In fact aggregate notation reflects this Matrix := ( (a, b, c) , (d, e, f) , (g, h, i) ); Vector := (x, y, x); but then the obvious are illegal: Vector := Matrix (1); -- (a, b, c) or Band_Matrix := Matrix (1 .. 2); -- ( (a, b, c) , -- (d, e, f) ) A good language should even permit Vertical_Band_Matrix := Matrix (Matrix'Range, 1 .. 2); -- ( (a, b) , (d, e) , -- (g, h) ) or Block := Matrix (1 .. 2, 1 .. 2); -- ( (a, b) , -- (d, e) )