Fortran · File status code

IOSTAT 23 — BACKSPACE Error

What does IOSTAT 23 — BACKSPACE Error mean in Fortran?

The I/O runtime detected a problem executing a BACKSPACE statement — commonly because the unit isn't connected for sequential access, is a device that doesn't support seeking (terminal, pipe), or the file position is otherwise inconsistent.

IOSTAT 23 — BACKSPACE ErrorIntel Fortran

Condition

The I/O runtime detected a problem executing a BACKSPACE statement — commonly because the unit isn't connected for sequential access, is a device that doesn't support seeking (terminal, pipe), or the file position is otherwise inconsistent.

Fix

Only BACKSPACE units opened with sequential access on a real disk file, and check IOSTAT after the OPEN to be sure the connection succeeded before relying on repositioning.

Pending source verification. Not yet checked against official documentation.

Related file status code