12.07.2015 Views

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Direct File Format (Formatted)Direct File Format (Formatted)Files processed by formatted direct input/output statements have a fixed length record format.One Fortran record corresponds to one logical record. The length of the logical recordmust be assigned in the OPEN statement RECL= specifier. If the Fortran record is shorter thanthe logical record, the remaining part is padded with blanks. The length of the Fortran recordmust not exceed the logical record. This fixed length record format is unique to Fortran.Direct File Format (Unformatted)Files processed by unformatted direct-access input/output statements have a fixed lengthrecord format, with no header record. One Fortran record can correspond to more than onelogical record. The record length must be assigned in the OPEN statement RECL= specifier.If the Fortran record terminates within a logical record, the remaining part is padded withbinary zeros. If the length of the Fortran record exceeds the logical record, the remaining datagoes into the next record.Binary File FormatFiles opened with FORM=’BINARY’ (or ACCESS=’TRANSPARENT’) are processed as astream of bytes with no record separators. While any file can be processed as binary, youmust know its format to process it correctly. Note that, even though ACCESS=’TRANSPAR-ENT’ is supported by LF64, FORM=’BINARY’ is the preferred method of opening such files.Note that these specifiers are not currently part of the Fortran standard and may vary fromone compiler to the next; however, this may change in future versions of the Fortran standard.Endfile RecordsAn endfile record must be the last record of a sequential file. Endfile records do not have alength attribute. The ENDFILE statement writes an endfile record in a sequential file. Afterat least one WRITE statement is executed, an endfile record is output under the followingconditions:• A REWIND statement is executed.• A BACKSPACE statement is executed.• A CLOSE statement is executed.Porting Unformatted FilesUnformatted files created on other platforms can be accommodated with certain runtimeoptions. “Big-endian” numeric data (integer, logical, and IEEE floating-point) can be accommodatedwith runtime option T. Note that the big-endian conversion is not performed for realvariables that are elements of a derived type if the whole type is being read. IBM370-format<strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong> 125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!