Visible to Intel only — GUID: GUID-0616C0E6-C8B5-4E0B-B1FA-03CEAFE1799D
Visible to Intel only — GUID: GUID-0616C0E6-C8B5-4E0B-B1FA-03CEAFE1799D
OPEN: PAD Specifier
The PAD specifier indicates whether a formatted input record is padded with blanks when an input list and format specification require 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:
|
Specifying PAD= is only permitted for files connected for formatted I/O. It is a changeable mode, which can be overridden by the PAD= specifier in the I/O control list of a data transfer statement. The padding mode only affects input; it has no effect on output. If PAD= is not specified, 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 specifying the PAD= I/O control list specifier in the data transfer statement, or by explicitly specifying the BN edit descriptor.
This specifier is not allowed in a WRITE statement or for unformatted input or output.