Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

OPEN: PAD Specifier

The PAD specifier indicates whether a formatted input record is padded with blanks when an input list and format specification requires more data than the record contains.

The PAD specifier takes the following form:

PAD = pd

pd

Is a scalar default character expression that evaluates to one of the following values:

'YES'

Indicates the record will be padded with blanks when necessary.

'NO'

Indicates the record will not be padded with blanks. The input record must contain the data required by the input list and format specification.

The default is 'YES'.

This behavior is different from FORTRAN 77, which never pads short records with blanks and doesn't support the PAD= qualifier. For example, consider the following:

  READ (5,'(I5)') J

If you enter 123 followed by a carriage return, FORTRAN 77 will issue the ENDRECDUR error message.

However, Intel® Fortran pads the 123 with 2 blanks unless you explicitly open the unit with PAD='NO'.

You can override blank padding by explicitly specifying the BN edit descriptor.

The PAD specifier is ignored during output.

This specifier is not allowed on unformatted input or output.