7.6 TYPE and PRINT Statements

The TYPE and PRINT statements transfer output data from internal storage to external records that are sequentially accessed.

TYPE and PRINT statements take the same forms, which can be any one of the following:

 TYPE f[,iolist]     PRINT f[,iolist]
 TYPE *[,iolist]     PRINT *[,iolist]
 TYPE n              PRINT n
f
Is the nonkeyword form of a format specifier.
iolist
Is the I/O-list specifier.
*
Is a list-directed format specifier. This parameter can also be specified as FMT=*.
n
Is the nonkeyword form of a namelist specifier.

The control-list parameters are f, * (or FMT=*), and n. The I/O list parameter is iolist.

The TYPE and PRINT statements function like formatted sequential WRITE statements with one important exception: a formatted sequential TYPE or PRINT statement can never be used to transfer data to user-specified logical units.

Example

In the following example, the PRINT statement writes one record to the implicit output device. The record has four fields of character data.

      CHARACTER*16 NAME, JOB
      PRINT 400, NAME, JOB
400   FORMAT ('NAME=',A,'JOB=',A)

For More Information:


Previous Page Next Page Table of Contents