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

Home » Public Forums » archive » Re: Can somebody explain this?
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: Can somebody explain this? [message #41031 is a reply to message #41030] Thu, 16 September 2004 06:16 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <cibvt8$qmt$1@canarie.caspur.it>,
"sandrokan" <mura@remove.ifsi.rm.cnr.it> wrote:

> (Sorry if it is a faw)
> I've spend days of dubbunging and then I've found that, on 5IDL.2:
>
> IDL> a=intarr(4)
>
> IDL> a(4)=1
>
> % Attempt to subscript A with <INT ( 4)> is out of range.
>
> % Execution halted at: $MAIN$
>
> IDL> a([4])=1
>
> IDL> print, a(3)
>
> 1
>
>
>
> Isn't it strange? Maybe it is reported somewhere in some idl guide, but I
> still can't believe
>
> it is real....
>
>
>
> Alex
>
>
>

This is an obscure feature of using arrays as subscripts. See Building
IDL Applications, p 133.

Clipping

If an element of the subscript array is less than or equal to zero, the
first element of the subscripted array is selected. If an element of the
subscript array is greater than or equal to the last subscript in the
subscripted array, the last element is selected. This clipping of out of
bounds elements can be disabled within a routine by using the
STRICTARRSUBS option to the COMPILE_OPT statement. (See the
documentation for �COMPILE_OPT� in the IDL Reference Guide manual for
details.) If STRICTARRSUBS is in force, then array subscripts that refer
to out of bounds elements will instead cause IDL to issue an error and
stop execution, just as an outof-range scalar subscript does.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: size of window object and xinteranimate loading
Next Topic: Changing height value in ion_image script

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

Current Time: Sun Oct 12 17:28:12 PDT 2025

Total time taken to generate the page: 2.64022 seconds