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 #77181 is a reply to message #77180] Thu, 11 August 2011 20:42 Go 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...
>
> I was being lazy/naughty and using a catch statement to detect when an
> index went out of range, which I knew would happen very occaisonally
> and was trying to avoid the performance hit of checking for it every
> time. This round off instead of an error behaviour made sure that plan
> didn't work!

If you do not like that behaviour, use

compile_opt strictarraysubs
[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 19:42:26 PDT 2025

Total time taken to generate the page: 0.00505 seconds