J3/01-317 Date: August 14, 2001 To: J3 From: Craig Dedo Subject: What is an Input/Output Error? Issue In preparing my proposed response to WG5 on the issue about what happens if a program tries to open an existing file with STATUS = "SCRATCH", I noticed that the Fortran standard does not rigorously define what an input / output error is. Analysis One might think that it is an I/O error if a program attempts an I/O action which is "not permitted" or which violates a restriction or prohibition. However, that is not the case. The current language of 9.5.3 in the Fortran 2000 draft [182:32] says, "The set of input / output error conditions is processor dependent." Application developers have an expectation that common programming or execution errors will in fact generate error conditions. Leaving the entire definition of what constitutes an I/O error condition as processor-dependent defeats this expectation and hinders portability. The Fortran 2000 standard should require that actions of I/O statements that violate the restrictions and prohibitions of I/O statements and format edit descriptors generate I/O error conditions. The processor should have the freedom to define additional I/O error conditions as it chooses to. The classification and reporting of I/O error conditions should continue to be processor-dependent. Edits Edits are with respect to 01-007r2. [182:32] Replace the sentence with the following. The processor shall detect as an input/output error condition the execution of an input/output statement which violates any restriction or prohibition. The definition of additional input/output error conditions is processor dependent. The classification and reporting of input/output error conditions is processor dependent. References 01-007r2, Fortran 2000 Draft 01-316, Named Scratch Files - Proposed Response to WG5 [End of J3 / 01-317]