forlang.hlp (Table of Contents; Topic list)
BACKSPACE
                                             Up Contents Index Back
─────BACKSPACE──────────────────────────────────────────────────────────────
 
     Action
 
     Positions a file at the beginning of the preceding record.
 
     Syntax
 
     BACKSPACE {unitspec |
     ([UNIT=]unitspec
     [, ERR=errlabel]
     [, IOSTAT=iocheck])}
 
     If UNIT= is omitted, <unitspec> must be the first parameter. The
     parameters can otherwise appear in any order.
 
     Parameter          Description
 
     unitspec           An integer expression specifying an external
                        unit.
 
     errlabel           The label of an executable statement in the same
                        program unit. An I/O error causes transfer of
                        control to the statement at <errlabel>. If
                        <errlabel> is omitted, the effect of an I/O error
                        is determined by the presence or absence of
                        <iocheck>.
 
     iocheck            An integer variable that returns zero if there
                        is no error, or the error number if an error
                        occurs.
 
     Remarks
 
     The BACKSPACE statement is not legal with a file that has been
     opened with MODE='WRITE'.
 
     The BACKSPACE statement backs up one record, except in the
     following special cases:
 
     Special Case            Result
 
     No preceding record     The file position is not changed
 
     Preceding record is     The file is positioned before
     end-of-file record      the end-of-file record
 
     File position is        The file is positioned to the
     in middle of record     start of that record
 
     Examples
 
           BACKSPACE 5
           BACKSPACE (5)
           BACKSPACE lunit
           BACKSPACE (UNIT = lunit, ERR = 30, IOSTAT = ios)
                                    -♦-