READF: End of file encountered [message #80376] |
Fri, 08 June 2012 11:53 |
Maryam Tabatabaei
Messages: 3 Registered: May 2012
|
Junior Member |
|
|
Hi all
In my code, I am matching two string arrays, and print the matched
indices and strings of those indices in a file.
To read the file, I am creating a structure and name everything but I
think my structure is wrong because I end up with a EOF error!
When I also print the first line of my file, it looks ridicules!
PLEASE HELP ME!!!!
openw,4,'matchingClusters.dat'
for i = 0,479 do for j=0,41 do
if(strmatch(matched_with_clusters(i),clusterID(j)) eq 1 ) then printf,
4, i,matched_with_clusters(i),j,clusterID(j) , format =
'(I10 ,A10,I10 ,A10)'
free_lun,4
;; this piece of code enables you to access to the different columns
;; of matchingClusters.dat file.
dataStruct = {fieldINDEX:0.0, fieldNAME:'', clusterINDEX:0.0,
clusterNAME:''}
file = 'matchingClusters.dat'
nrows = file_lines(file)
cluster = replicate(dataStruct,nrows)
openr,4,file
readf,4,cluster
;;; BAM! THE ERROR HAPPENS RIGHT HERE
|
|
|