IDL> a = dblarr(4,4)
IDL> b=[4]
IDL> a[1,4]++
% Attempt to subscript A with <INT ( 4)> is out of range.
% Execution halted at: $MAIN$
IDL> a[1,b]++
IDL> print, a
0.0000000 0.0000000 0.0000000 0.0000000
0.0000000 0.0000000 0.0000000 0.0000000
0.0000000 0.0000000 0.0000000 0.0000000
0.0000000 1.0000000 0.0000000 0.0000000
IDL> b=[6]
IDL> a[1,b]++
IDL> print, a
0.0000000 0.0000000 0.0000000 0.0000000
0.0000000 0.0000000 0.0000000 0.0000000
0.0000000 0.0000000 0.0000000 0.0000000
0.0000000 2.0000000 0.0000000 0.0000000
This is quite annoying. I thought it was a bug (or feature) from IDL, but it seems that I didn't read the manual good enough. With the option
compile_opt STRICTARRSUBS this behaviour is not allowed anymore...Mari Minari from Support at Ittvis (formerly RSI) helped me out on this. Thanks!!

Calendar



