개선중인 프로그램에서 Fortran이 기존 파일을 감지하지 못하는 것으로 나타났습니다. 이로 인해 수정되지 않은 논리 오류가 발생했습니다. 나는 당신이 문제 또는 과실을 지적하고 저에게 당신의 개정을 줄 수 있으면 높게 평가한다.존재하지 않는 파일을 감지 할 수 없습니다.
open(unit=nhist,file=history,iostat=ierr)!This setting cannot exit program if file does not exist because ierr is always 0
if (ierr /=0) then
write(*,*)'!!! error#',ierr,'- Dump file not found'
stop
endif
!I used below statement, the program exits even though a file is existing
open(unit=nhist,file=history,err=700)
700 ierr=-1
if (ierr /=0) then
write(*,*)'!!! error#',ierr,'- Dump file not found'
stop
endif
친애하는 Francescalus 님, 정말 고마워요! 예. 그것은 'status = old'를 추가 할 때 작동합니다. – Leon