Simple question on Arrays [message #29142] |
Mon, 04 February 2002 00:19 |
idlfreak
Messages: 47 Registered: October 2001
|
Member |
|
|
HI,
I have written a small code to get a 3D array from a 2D array. The
error i encounter is :
DL> multfile
RESULT STRING = Array[3]
I INT = 0
% Out of range subscript encountered: A.
% Execution halted at: MULTFILE 16
D:\RSI\IDL55\Akhila\JanWeek3\multfile.pro
% $MAIN$
Can anybody please tell me, why the subscripts are out of range. i'm
not able to understand that.
----------------------------------------------------------
PRO multfile
result = Dialog_Pickfile(/Multiple_Files)
help, result
a = size(result)
b = a[3]
for i = 0, b-1 do begin
filename = result[i]
image = bytarr(512,512)
OpenR, lun, filename, /Get_lun
ReadU, lun, image
Free_lun, lun
help, i
a[i] = image
endfor
;help, image
END
---------------------------------------------------------
Any help is appreciated.
Thank you
Cheers,
Akhila.
|
|
|