Interpretation 92

Values of the PAD= Specifier in the INQUIRE Statement

To:	J3

From:	Craig Dedo

Date:	March 21, 2001

Subject:	Interpretation 000092 - Values of the PAD= Specifier in the INQUIRE Statement

NUMBER:	000092

TITLE:	Values of the PAD= Specifier in the INQUIRE Statement

KEYWORDS:	PAD=, INQUIRE

DEFECT TYPE:	Erratum

STATUS:	J3 Consideration in Progress

QUESTION:

The normative text of the Fortran 90 and Fortran 95 standards ([1] 9.6.1.22; [2] 9.6.1.22) specifies that the PAD= specifier in the INQUIRE statement returns the value YES if there is no connection or if the connection is for unformatted input/output.

This behavior is different from the results of almost every other specifier for the INQUIRE statement if the property being inquired about is unknown or undefined. For those specifiers, the value returned in the specifier's variable is either UNKNOWN or UNDEFINED.

Is the specified behavior of the PAD= specifier for an unformatted file or an unconnected unit intentional?

ANSWER:

No, this specification is in error. Edits are supplied to correct this defect.

DISCUSSION:

The concept of padding input records does not make any sense if the unit is connected for unformatted input/output or if the unit is not connected. A return value of YES does not reflect what is really going on. A return value of UNDEFINED is more appropriate in these situations.

The normative text for this section in Fortran 95 is unchanged from Fortran 90, so correcting this defect is an incompatibility with Fortran 90.

EDITS:

The following edits are with respect to the Fortran 95 standard.

[3:32+]	Add the following list item to the list in section 1.5.1, "Fortran 90 compatibility".

(3)	The PAD= specifier in the INQUIRE statement in this standard returns the value UNDEFINED instead of YES if there is no connection or the connection is for unformatted input/output.

[159:40-41]	Replace the second sentence of the paragraph in section 9.6.1.22 with the following.

The <scalar-default-char-variable> in the PAD= specifier is assigned the value YES if the connection of the file to the unit included the PAD= specifier and its value was YES or if there was no PAD= specifier. If there is no connection or if the connection is not for formatted input/output, the <scalar-
default-char-variable> is assigned the value UNDEFINED.

[325:30]	Change the entry in the table to:

PAD=	UNDEFINED	YES, NO, or UNDEFINED	UNDEFINED

SUBMITTED BY:	Craig T. Dedo

HISTORY:

01-172	m156	Submitted with proposed response.

References

[1]	ISO/IEC 1539:1991, International Standard Fortran 90

[2]	ISO/IEC 1539-1:1997(E) International Standard Fortran 95, Part 1, Base language

[3]	01-007, Fortran 2000 Draft

[4]	01-111r3, Issue 308 - Oddities for PAD= in INQUIRE

[End of J3 / 01-172]