HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
PRINT
Chapter 10 431
PRINT
Writes to standard output.
Syntax
The syntax of the PRINT statement can take one of two forms:
Formatted and list-directed syntax:
PRINT
format
[,
output-list
]
Namelist-directed syntax:
PRINT
name
format
is one of the following:
An asterisk (*), specifying list-directed I/O.
The label of a FORMAT statement containing the format specification.
An integer variable that has been assigned the label of a FORMAT
statement.
An embedded format specification.
name
is the name of a namelist group, as previously defined by a NAMELIST
statement . Using the namelist-directed syntax, the PRINT statement sends
data in the namelist group to standard output. To direct output to a
connected file, you must use the WRITE statement and include the NML=
specifier.
output-list
is a comma-separated list of data items for output. The data items can
include expressions and implied-DO lists.
Description
The PRINT statement transfers data from memory to standard output. (Unit 6 is preconnected
to the HP-UX standard output.) The PRINT statement can be used to perform formatted,
list-directed, and namelist-directed I/O only.
To direct output to a connected file, use the WRITE statement.
Examples
The examples in this section illustrate different uses of the PRINT statement.