XL Fortran for AIX 8.1

User's Guide


Implementation Details of File Formats

XL Fortran implements files in the following manner:

Sequential-access unformatted files:
An integer that contains the length of the record precedes and follows each record. The length of the integer is 4 bytes for 32-bit applications. It is 4 bytes if you set the uwidth run-time option to 32(the default) and it is 8 bytes if you set uwidth to 64 for 64-bit applications.

Sequential-access formatted files:
XL Fortran programs break these files into records while reading, by using each newline character (X'0A') as a record separator.

On output, the input/output system writes a newline character at the end of each record. Programs can also write newline characters for themselves. This practice is not recommended because the effect is that the single record that appears to be written is treated as more than one record when being read or backspaced over.

Direct access files:
XL Fortran simulates direct-access files with AIX files whose length is a multiple of the record length of the XL Fortran file. You must specify, in an OPEN statement, the record length (RECL) of the direct-access file. XL Fortran uses this record length to distinguish records from each other.

For example, the third record of a direct-access file of record length 100 bytes would start at the 201st byte of the single record of an AIX file and end at the 300th byte.

If the length of the record of a direct-access file is greater than the total amount of data you want to write to the record, XL Fortran pads the record on the right with blanks (X'20').


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]