FORTRAN 77 Language Reference

Sequential Formatted I/O

On internal files, the FORTRAN Standard includes only sequential formatted I/O. (I/O is not a precise term to use here, but internal files are dealt with using READ and WRITE statements.) Internal files are used by giving the name of the character object in place of the unit number. The first read from a sequential-access internal file always starts at the beginning of the internal file; similarly for a write.

Example: Sequential, formatted reads:


	CHARACTER X*80 
	READ( 5, '(A)' ) X 
	READ( X, '(I3,I4)' ) N1, N2 

The above code reads a print-line image into X, and then reads two integers from X.