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 X-Received: by 10.236.31.68 with SMTP id l44mr6204666yha.29.1407346570707; Wed, 06 Aug 2014 10:36:10 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!v10no4989997qac.1!news-out.google.com!b3ni18827qac.1!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 06 Aug 2014 12:36:10 -0500 Date: Wed, 06 Aug 2014 13:36:09 -0400 From: Peter Chapin User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Array index overloading References: <03d102e1-1c2f-4056-82d5-3eaaaffbb0f1@googlegroups.com> In-Reply-To: <03d102e1-1c2f-4056-82d5-3eaaaffbb0f1@googlegroups.com> Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-PfzRh0qVXq/+OSSJjWrXE/WkeY5ZkPQdRSyvuUDgN6sIp7dUU4cWI7q6WA5xa6Dzrv5FbRbyyDMhFMg!WTN3UcFTRWGPcvEj1KdvfMALgw/DHNHFgu2XPADXusOWk12G1byeh7751nhM2Is= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1797 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Received-Bytes: 2100 X-Received-Body-CRC: 2078088316 Xref: news.eternal-september.org comp.lang.ada:21492 Date: 2014-08-06T13:36:09-04:00 List-Id: On 2014-08-06 12:47, marmaduke.woodman@univ-amu.fr wrote: > Handling index arrays and generating an output array is something I can write, so my question is if the syntax can be overloaded, or I should expect to implement an explicit "slice" function? As Pascal mentioned one dimensional array slices are supported in Ada by just indexing using notation A(I .. J) for array A. If you want non-unity strides, or multi-dimensional slices, or some other fancier effects, you will need to turn to a library of some kind. Although as I write this I'm wondering if a subtype with a static predicate could cover some of those bases. Hmm. Peter