FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-87
PRINT Statement
°
In a FORTRAN OPEN statement, as in
OPEN( 6, MODE = 'OUTPUT')
°
In a TACL ASSIGN command, as in
ASSIGN FT006, , OUTPUT
°
In a UNIT compiler directive, as in
UNIT (6, OUTPUT)
For more information about using unit 6 as a shared file, see the OPEN Statement 
on page 7-70.
•
The PRINT statement uses the first character of each record to control vertical 
spacing if you specify
°
SPACECONTROL = 'YES' when you open unit 6.
°
SPACECONTROL = 'DEVICE' when you open unit 6—explicitly or implicitly— 
and the device is a terminal, a printer, or a process.
The default value for SPACECONTROL is 'DEVICE'. The following table shows 
how FORTRAN interprets the first character of each record printed if 
SPACECONTROL is 'YES' or if SPACECONTROL is 'DEVICE' and the device to 
which you are printing is a terminal, a printer, or a process.
Note that these codes do not control vertical spacing on all devices.
•
Execution of a PRINT statement for a file that does not exist creates that file (if no 
error condition occurs).
•
An entry in the output-list can assume the form of an implied DO list. For 
example, the following statement prints every element of array EMPLOYEES:
PRINT 90, (employees(k), k = 1,289)
•
You cannot PRINT an EDIT format file in a FORTRAN program that is running as a 
NonStop process.
•
If you specify ENV OLD or you do not specify an ENV directive, your program uses 
the C-series FORTRAN library.
If you specify ENV COMMON, your program uses the D-series FORTRAN runtime 
library. For more information, see Section 13, Mixed-Language Programming.
Character Vertical Spacing Before Printing
Blank One line
0 Two lines
1 To first line of next page
+ No advance










