How can I do this
work?
Thanks in advance.
Apparently, you just need to rewind the file with the instruction :
REWIND(10)
After that, you can write something else in the file 10 (these WRITE
statements will overwrite the previous contents).
But if you don't write as many values I don't think that all the old
ones will be deleted. A safer way would be to close and reopen the
file as a replacement:
close(10)
open(10,file='data',status='replace')
Simon
No, the old values will be entirely deleted because a final CLOSE(10)
will be executed automatically at the end of the run, fixing the new
file end position.
I forgot the key point : this new file end position is always located
just after the last written record (if no WRITE statement occurs, then
the old file end position remains unchanged).