FORTRAN 77 Language Reference

Direct Access I/O

f77 extends direct I/O to internal files.@

This is like direct I/O on external files, except that the number of records in the file cannot be changed. In this case, a record is a single element of an array of character strings.

Example: Direct access read of the third record of the internal file, LINE:


demo% cat intern.f 
	CHARACTER LINE(3)*14 
	DATA LINE(1) / ' 81 81 ' / 
	DATA LINE(2) / ' 82 82 ' / 
	DATA LINE(3) / ' 83 83 ' / 
	READ ( LINE, FMT='(2I4)', REC=3 ) M, N 
	PRINT *, M, N 
	END 
demo% f77 -silent intern.f 
demo% a.out 
  83 83 
demo%