Set position in a file in fortran?
-
27-09-2019 - |
Question
How do I set the position in a file in Fortran. As far as I understand, INQUIRE(unit, pos=currentpos)
returns the current position in the file. How do I set the position to currentpos?
I know there's FSEEK, but it appears to be a portability layer on POSIX in ifort. I would prefer a standard way.
Solution
There seems to be no other way then fseek or lseek to set the position in a file.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow