Does anyone have any suggestions as to the best way to perform speculative file access?
I'll give an example: I have a file saved from FORTRAN. I want to add a version number as the first entry in the file. OK, so my standard unformatted WRITE can do that, but now I have some files with a version number, some without. What READ can I do to perform the following logic:
Read first entry - is it a version number?
If NO - use file reading routine A
If YES - use file reading routine B
Obviously, once read I'd save it out with a version number.
Thanks for you help,