[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading into arrays with order > 2
You are trying to read into a subscripted variable which is passed to
readf by value
and not by reference so when readf finishes all3MomData is unchanged.
this should work (assumimg that all3MomData matches the file format,
for i=0, n_elements(names3Mom)-1 do begin
openr, lun, names3Mom[i], /get_lun
readf, lun, temp
Steven Riley wrote:
> Assuming names3Mom is a 1D array of strings (of valid filenames) is there
> any reason why the following code will not read many files into a 3d array?
> FOR I=0,1 DO BEGIN
> close,1 & openr,1,names3Mom(I)
> I get no error messages, but when I look at my array it contains no data...?
> I'm quite sure the files being read contain data. Is this some inherent
> problem with readf and arrays with order > 2?
> Linacre College
> OX1 3JA
> 01865 - (2)81229 (W)
> 01865 - 209295 (H)
Dpt. of Radiology (MRI), Geneva University Hospitals
tel. : (+41 22) 372 70 70