Closed file rewound?

Closed file rewound?

Suppose I open a file, read a line or two, and then close it. Is that file automatically rewound? In others words, if I open it again later in the same program, will the file be repositioned to the beginning?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Position is a property of the file connection, not the file itself. Once you close the file, the connection goes away. Upon reopening, the position is the default, based on what you specified with POSITION=, if any. Note that the default is 'ASIS', which for Compaq Fortran is the same as 'REWIND'.


Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today