comp.lang.ada
 help / color / mirror / Atom feed
* Array index overloading
@ 2014-08-06 16:47 marmaduke.woodman
  2014-08-06 16:53 ` Pascal Obry
  2014-08-06 17:36 ` Peter Chapin
  0 siblings, 2 replies; 9+ messages in thread
From: marmaduke.woodman @ 2014-08-06 16:47 UTC (permalink / raw)


Hi all,

I am new to Ada and have perhaps a boring question, coming from array oriented languages such as MATLAB & NumPy in Python: 

Is it possible to overload the indexing operator? For example, in the aforementioned languages, one could index with the value 1 to get the first element, or index with a vector [2, 3, 4] to obtain a vector of the 2nd, 3rd and 4th elements. 

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? 


A more general question: from my brief searches on the internet, I have not uncovered a generic N-dimensional array library, and I am curious how users of Ada in the scientific domains proceed: have I missed something or is idiomatic Ada array code written in looped style?


regards,
Marmaduke


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-08-07  5:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2014-08-07  5:17   ` Randy Brukardt

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