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

Home » Public Forums » archive » Re: Strange arrary indexing quirk?
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: Strange arrary indexing quirk? [message #77180 is a reply to message #77179] Thu, 11 August 2011 20:45 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 11, 10:12 pm, Beaker <mattjamesfran...@gmail.com> wrote:
> Does anyone have any insight into why this happens? I'd expect the
> second line to also throw an error. A lot of the inner workings of IDL
> seem pretty arcane and hard to guess at before you try things...

It happens because it was chosen that way when the language was
defined. Quoting from the help:

"STRICTARRSUBS — When IDL subscripts one array using another array as
the source of array indices, the default behavior is to clip any out-
of-range indices into range and then quietly use the resulting data
without error. This behavior is described in Understanding Array
Subscripts. Specifying STRICTARRSUBS will instead cause IDL to treat
such out-of-range array subscripts within the body of the routine
containing the COMPILE_OPT statement as an error. The position of the
STRICTARRSUBS option within the module is not important: All
subscripting operations within the entire body of the specified
routine will be treated this way."
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Strange arrary indexing quirk?
Next Topic: iPlot Axes Colour

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

Current Time: Wed Oct 08 15:55:46 PDT 2025

Total time taken to generate the page: 0.00478 seconds