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

Home » Public Forums » archive » Invalid indices?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Invalid indices? [message #68416] Tue, 27 October 2009 10:19
Y.T. is currently offline  Y.T.
Messages: 25
Registered: December 2004
Junior Member
So I'm kinda living under a rock:
IDL Version 6.3, Microsoft Windows (Win32 x86 m32)

so I'm curious whether this is intended/expected behaviour or a bug or
what (and whether it has change in recent years):

IDL> t = lindgen(7)
IDL> print,t
0 1 2 3 4
5 6

IDL> n=5*indgen(5)
IDL> print,n
0 5 10 15 20

IDL> t[n] = 100
IDL> print,t
100 1 2 3 4
100 100

So element number 0 got set to 100 (OK), element number 5 got set to
100 and ... element number 6 also got set to 100?

Why is that? I understand that I'm specifying elements "out of
range" (number 10 and 15 etc) - is that the reason? Is this
documented? It took me by surprise...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: quadtree algorithm
Next Topic: Re: MAC running IDL 7.0 from the command line

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

Current Time: Wed Oct 08 13:46:17 PDT 2025

Total time taken to generate the page: 0.06937 seconds