comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Chapin <PChapin@vtc.vsc.edu>
Subject: Re: Array index overloading
Date: Wed, 06 Aug 2014 13:36:09 -0400
Date: 2014-08-06T13:36:09-04:00	[thread overview]
Message-ID: <ppKdnfmkdIYX-n_ORVn_vwA@giganews.com> (raw)
In-Reply-To: <03d102e1-1c2f-4056-82d5-3eaaaffbb0f1@googlegroups.com>

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


  parent reply	other threads:[~2014-08-06 17:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 16:47 Array index overloading marmaduke.woodman
2014-08-06 16:53 ` Pascal Obry
2014-08-06 17:38   ` marmaduke.woodman
2014-08-06 19:25     ` Georg Bauhaus
2014-08-06 19:43     ` Adam Beneschan
2014-08-06 21:51     ` Pascal Obry
2014-08-06 23:53     ` Shark8
2014-08-06 17:36 ` Peter Chapin [this message]
2014-08-07  5:17   ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox