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

Home » Public Forums » archive » indexing bug?
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: indexing bug? [message #92894 is a reply to message #92892] Fri, 18 March 2016 00:49 Go to previous messageGo to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Friday, March 18, 2016 at 6:57:28 AM UTC+1, Dae-Kyu Shin wrote:
> Hi
>
> for example
>
> arr = indgen(3)
>
> ;; in this case, of course error occuring
> print, arr[5]
>
> ;; but in this case, there is no error
> print, arr[[5]]
>
> is this bug??

No, it's a feature :-) Array subscripts are clipped, unless STRICTARRSUBS is used:

http://www.exelisvis.com/docs/using_arrays_as_array_su.html

regards,
Lajos
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Plot function failing!
Next Topic: Take values from several arrays with nearest neighbour matching

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

Current Time: Thu Oct 09 23:20:08 PDT 2025

Total time taken to generate the page: 0.00232 seconds