XL Fortran for AIX 8.1

Language Reference


A record is a sequence of characters or a sequence of values. The three kinds of records are formatted, unformatted, and endfile.

Formatted Records

A formatted record is a sequence of any ASCII characters that can be printed in a readable form. When a formatted record is read, data values represented by characters are converted to an internal form. When a formatted record is written, the data to be written is converted from internal form to characters.

If a formatted record is printed using the AIX asa command, the first character of the record determines vertical spacing and is not printed. See "Printing Output Files with Fortran ASA Carriage Controls (asa)" in the XL Fortran for AIX User's Guide for details. The remaining characters of the record, if any, are printed beginning at the left margin. Vertical spacing can be specified in a format specification in the form of literal data. Vertical spacing is as follows:

First Character of Record Vertical Spacing Before Printing
Blank One line
0 Two lines
1 To first line of next page
+ No advance

The characters and spacing shown are those defined for print records. If you use any other character as the first character of the record, an error is produced. If the print record contains no characters, spacing is advanced by one line and a blank line is printed. If records are to be displayed at a terminal, the first character of the record is also used, but only the characters blank, 0, and + produce the spacing shown. (The AIX asa command must be used if these print codes are to be displayed on a terminal. See "Printing Output Files with Fortran ASA Carriage Controls (asa)" in the User's Guide for details.)

Unformatted Records

An unformatted record is a sequence of values in an internal representation that can contain both character and noncharacter data or can contain no data. The values are in their internal form and are not converted in any way when read or written.

Endfile Records

If it exists, an endfile record is the last record of a file. It has no length. It can be written explicitly by an ENDFILE statement. It can be written implicitly to a file connected for sequential access when the last data transfer statement was a WRITE statement, no intervening file positioning statement referring to the file has been executed, and the following is true:

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