ON_IOERROR working [message #31320] |
Fri, 21 June 2002 13:51 |
astib
Messages: 15 Registered: June 2002
|
Junior Member |
|
|
Hi all,
Could anybody explain how ON_IOERROR works ? I am looking at somebody
else's code and I do not understand how it gets out of the loop. The
code is something like this -
for(file_num = firstfile, lastfile) do begin
close, 2
open4, 2, filelist(file_num)
on_ioerror, end
next:
readu,2, data
blahblahblah....
count = count+1
goto, next
end: blah blah
some_count = some_count + 1
endfor
There isn't any conditional statement inbetween next: and goto, next.
Is it that, when it finishes reading one file, ioerror occurs, and the
control goes to label specified by label with on_ioerror ? So the
conditional statement for skipping goto statement is not needed ?
I am a student and relatively new to IDL. Sorry for asking trivial
questions, but I am really confused.
Thanks,
Asti
|
|
|