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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,68f66270391b820 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-24 17:33:52 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Slices of 2d arrays? Date: 24 Jul 2002 17:33:52 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0207241633.6518ef31@posting.google.com> References: NNTP-Posting-Host: 205.232.38.247 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1027557232 21762 127.0.0.1 (25 Jul 2002 00:33:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 Jul 2002 00:33:52 GMT Xref: archiver1.google.com comp.lang.ada:27380 Date: 2002-07-25T00:33:52+00:00 List-Id: Peter Hermann wrote in message news:... > g(1 ,4 ) is of type character > g(1..1,4..5) is of type grid > g(1 ,4..5) is of type grid slice? > g(1..1,4 ) is of type grid slice? > and the n-dimensional arrays? > > No. Language designers will certainly refusei, IMHO. It is not hard to work out the semantics of this feature, just see Algol-68 for inspiration. However, as soon as you extend slices to >1D arrays, the feature no longer obeys the "Bauer Principle" which says that you should not pay overhead for a feature unless you use it. That's because general slicing results in non-standard strides, and you have to allow for this whether or not such slicing is used.