FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-10
BACKSPACE Statement
You can use 501 ASSIGN statements within a single program unit.
Example
ASSIGN 10 to J
GO TO 50
10 CONTINUE
.
ASSIGN 20 TO J
GO TO 50
20 CONTINUE
.
50 statement
.
GO TO J(10,20)
BACKSPACE Statement
The BACKSPACE statement backspaces by one record the file connected to a unit. If
there is no preceding record in the file, FORTRAN ignores the statement.
unit
is an integer expression from 1 through 999 that identifies an external unit
connected for sequential access. The unit must be connected to a magnetic tape,
an unstructured file with fixed-length records, an EDIT format file, or a relative file.
You cannot backspace entry-sequenced, key-sequenced, or $RECEIVE files.
ios
is an integer variable or integer array element in which FORTRAN returns an error
number if an error occurred while executing the BACKSPACE statement. If the
BACKSPACE operation is successful, ios is zero. For more information about
error numbers, see the Error Numbers on page 6-5.
BACKSPACE
unit
unit
, IOSTAT=ios
, ERR=lbl
. . .
UNIT=unit
IOSTAT=ios
ERR=lbl
, UNIT=unit
, IOSTAT=ios
, ERR=lbl
. . .










