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

Home » Public Forums » archive » Re: negative indices, am I missing something here?
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: negative indices, am I missing something here? [message #81989 is a reply to message #81987] Fri, 02 November 2012 14:53 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
fawltylanguage@gmail.com writes:

> Array subscripts are always clipped. From IDL help:
>
> "If an element of the subscript array is less than or equal to zero, the first element of the subscripted array is selected. ...
>
> Note: Because of the confusion between the clipping of array subscripts and the use of negative indices (see the next section), it is best to avoid using code that relies on this clipping behavior."

You can think of it as karmic justice for sins of the past. ;-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: change values of structure variable
Next Topic: use of temporary in IDL

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

Current Time: Sun Oct 12 00:02:23 PDT 2025

Total time taken to generate the page: 0.01034 seconds