Tuesday, 10 September 2013

arithmetic error: Floating illegal operand [IDL]

arithmetic error: Floating illegal operand [IDL]

I have this code:
close, 1 & openr,1,filename,error=err
if (err ne 0) then begin
close, 1
n=0
return
endif
line=fltarr(41)
while(not(eof(1))) do begin
readf,1,line
endwhile
And on the line readf,1,line I get the following error:
READF: End of file encountered. Unit: 1, File: results
Program caused arithmetic error: Floating illegal operand
I see what the cause is and I read the docs about it, but I still don't
understand what arithmetic error has to do with EOF (why EOF? I checked if
not(eof(1))) and what to do to get rid of this error. Do you have any
ideas?

No comments:

Post a Comment