FORTRAN Reference Manual
Introduction to File I/O in the HP NonStop 
Environment
FORTRAN Reference Manual—528615-001
5-31
I/O Performance
Logical values are output as T or F. Complex values are enclosed in parentheses with 
a comma separating the real from the imaginary part. The following sample program is 
an example of list-directed output:
PROGRAM example
INTEGER k(5)
COMPLEX a, b
REAL c
DATA a, b, c, k/(6, 1), (3, -2), 1.E-3,5,10,20,40,1/
PRINT *, a, b
PRINT *, c
PRINT *, k
END
Output: (6, 1) (3, -2)
 .001
 5 10 20 40 1
I/O Performance
You can increase the execution speed of your FORTRAN programs by using 
techniques provided by the Guardian file system to read and write files faster.
Sequential Block Buffering
If a file is a structured (relative, entry-sequenced, or key-sequenced) disk file, and its 
OPEN statement specifies:
MODE = 'INPUT'
ACCESS = 'SEQUENTIAL'
PROTECT = 'PROTECTED' or PROTECT = 'EXCLUSIVE'
FORTRAN uses the “sequential block buffering” feature of the Guardian file system to 
read the file. Sequential block buffering can make your program run significantly faster 
by transferring data from the disk process to the FORTRAN program one block at a 
time rather than one logical record at a time.
Read-Through Locks
If your FORTRAN program is reading a structured file when another process is 
updating the file and your program tries to read a record while the updating process 
has that record locked, your program usually waits until the updating process unlocks 
the record.










