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

Home » Public Forums » archive » IDL array subscripting issue
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL array subscripting issue [message #90227 is a reply to message #90225] Thu, 12 February 2015 09:29 Go to previous messageGo to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 12.02.2015 18:22, David B wrote:
> ===============================
>
> IDL> a = INDGEN(10)
> IDL> b = [0,10]
> IDL> print, a[b]
> 0 9
> IDL> b = [0,9]
> IDL> print, a[b]
> 0 9
>
> ===============================
> Why?!

This is a strange but documented feature of IDL:

http://www.exelisvis.de/docs/Using_Arrays_as_Array_Su.html

See "Array Subscripts and Clipping".

Depending on what you want, this is a feature of a bug. I learned to
like it as a feature, personally.

Cheers,

Fabien
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Variable attributes and undef vars
Next Topic: CURVFIT with XY error

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

Current Time: Wed Oct 08 17:04:29 PDT 2025

Total time taken to generate the page: 0.00372 seconds