7.5 ACCEPT Statements

The ACCEPT statement transfers input data to internal storage from external records accessed under the sequential mode of access.

An ACCEPT statement takes one of the following forms:

ACCEPT f[,iolist]
ACCEPT *[,iolist]
ACCEPT 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 ACCEPT statement functions like a sequential READ statement with one important exception: an ACCEPT statement can never be connected to user-specified logical units.

Example

In the following example, the ACCEPT statement reads character data from the implicit unit and assigns binary values to each of the five elements of the array CHARAR:

      CHARACTER*10 CHARAR(5)
      ACCEPT 200, CHARAR
200   FORMAT (5A10)

For More Information:


Previous Page Next Page Table of Contents