Fortran read last line from file

broken image
broken image

This file may be pre-existing or created by the program. The OPEN statement's FILE= specifier establishes the association of a logical unit to a named, physical file at runtime. Also, certain 'preconnected ' units are automatically associated with specific files at the start of program execution. The asterisk stands for standard inpu t file when it appears in a READ statement it stands for standard output file when it appears in a WRITE or PRINT statement.Ī Fortran logical unit can be associated with a specific, named file through the OPEN statement. The character * may appear as a logical unit identifier. Logical units are identified in an I/O statement by a logical unit number, a nonnegative integer from 0 to the maximum 4-byte integer value (2,147,483,647). f90 is discussed at the end of the chapter.ĭata is transferred between the program and devices or files through a Fortran logical unit. Many of the I/O features found in f77 are not available in this release (1.2) of f90 this chapter primarily describes f77 features. This chapter discusses the input/output features provided by Sun Fortran compilers. Fortran Programmer's Guide: 2 - Fortran Input/Output