Sun Studio 12: Fortran Library Reference

1.4.44.1 Limitations

The I/O handler can only replace once character with another character. It cannot replace one character with more than one character.

The error recovery algorithm can only fix a bad character it currently reads, not a bad character which has already been interpreted as a valid character in a different context. For example,in a list-directed read, if the input is "1.234509.8765" when the correct input should be "1.2345 9.8765" then the I/O library will run into an error at the second period because it is not a valid number. But, by that time, it is not possible to go back and change the ’0’ into a blank.

Currently, this error-handling capability does not work for namelist-directed input. When doing namelist-directed input, the specified I/O error handler will not be invoked when an error occurs.

I/O error handlers can only be set for external files, not internal files, because there are no logical units associated with internal files.

The I/O error handler is called only for syntactic errors, not system errors or semantic errors(such as an overflowed input value).

It is possible to have an infinite loop if the user-supplied I/O error handler keeps providing a bad character to the I/O library, causing it to call the user-supplied I/O error handler over and over again. If an error keeps occuring at the same file position then the error handler should terminate itself. One way to do this is to take the default error path by setting CORR_ACTION to 0. Then the I/O library will continue with the normal error handling.