comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Loop Arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Loop Arrays [message #26979] Tue, 09 October 2001 12:33 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
Hi,

I am interested in creating circular arrays, where subscripts that would
be out-of-bounds on a regular array just start indexing on the other side
of the array.

ex:
a = circleIndgen( 10 )
print, a[ -1 ]
9
print, a[ 11 ]
1
print, a[ [0,10,20,100] ]
0, 0, 0, 0

print, a[ 8:11 ]
8, 9, 0, 1

;;; not sure if this makes sense, but i think it can easily be
;;; done if the rest is possible...
print, a[ 8:2 ]
8, 9, 0, 1

I think that overloading the [] operators is not an option from my
understanding of IDL. Does anyone know if this is possible? Desirable?
Dumb?

Thanks,

-k.

--
Ken Mankoff
LASP://303.492.3264
http://lasp.colorado.edu/~mankoff/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: copying a file
Next Topic: fit function

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:05:45 PDT 2025

Total time taken to generate the page: 0.56508 seconds