> At 3:30 pm +0000 12/12/99, Philip Gladwin wrote:
Suggest the following altered version:
program testing_writing
integer :: i, ios
open(unit = 10,iostat = ios,file = 'err.dat', status = 'replace')
if (ios /= 0) go to 100
do i = 1, 10
write(10,'(I2)', iostat=ios) i
if ios /= 0) go to 100
enddo
close(10)
stop
100 write(*,*) 'program terminated. i =, ios = ',i, ios
end program testing_writing
Notes:
ios was not set by the write statement;
therefore a specific test needs to be included after the write.
ios was set by the OPEN statement, but was not tested;
hence a specific test is inserted after the OPEN.
> > My problem is that I ALWAYS receive the message
> >
> >program terminated i, iso = 0,0 .
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|