next up previous contents
Next: Writing to a string Up: Input and Output. Previous: FORMAT   Contents

File Positioning

We can set the position of the file pointer using special instructions.

positions the file pointer to the beginning of the specified unit. Note that, writing a record in a sequential file destroys all subsequent information, so by rewinding and writing a file we lose all the data.
backspace(unit=10, iostat=ierr)
positions the file pointer back one record.
inserts the endfile record in the file, and keeps the file open, with the file pointer positioned on the endfile record.

Adrian Sandu 2001-08-26