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

Home » Public Forums » archive » negative array index in IDL8
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
negative array index in IDL8 [message #86374] Fri, 01 November 2013 10:38 Go to previous message
chuxiangning is currently offline  chuxiangning
Messages: 17
Registered: September 2012
Junior Member
Hi All,
My first noobie post here. I wanted to turn off negative index in the following commands. New IDL return error for x[[-1,-2]], but not for x[-1]. Is there anyway that I can turn off the negative indexing completely?
Thank you in advance!


pro test_negative_index
COMPILE_OPT STRICTARRSUBS
x=INDGEN(10)
print,x[-1]
print,x[[-1,-2]]
end

Here is the result I got:
% Compiled module: TEST_NEGATIVE_INDEX.
9
% Array used to subscript array contains out of range subscript: X.
% Execution halted at: TEST_NEGATIVE_INDEX 6
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: derivative function in IDL similar as DIFF in matlab
Next Topic: covariance matrix

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

Current Time: Fri Oct 10 15:46:13 PDT 2025

Total time taken to generate the page: 1.27663 seconds