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

Home » Public Forums » archive » READF: End of file encountered
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
READF: End of file encountered [message #80376] Fri, 08 June 2012 11:53
Maryam Tabatabaei is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to write to file ?
Next Topic: How to calculate 3SIGMA in Linfit!

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

Current Time: Wed Oct 08 15:23:39 PDT 2025

Total time taken to generate the page: 0.00665 seconds