Re: help for reading a binary file
- From: "e p chandler" <epc8@xxxxxxxx>
- Date: 21 Jun 2006 18:31:24 -0700
[reading back an unformatted data file with a program compiled with a
different Fortran does not work]
To Arjen: The total size of the data file is 10 bytes more for that of
the required data. I guess that there are some extra bytes to identify
the records. I will try to do some tests according to your advice, but
I don't know if I could solve it so soon.
You can not expect to read unformatted files written by compiler X with
compiler Y.
To Clive Page: in fact, I'm a new hand in Fortran, so I just know some
basic operations of lf95, which is on hand. I will try to use the g95.
Look at the data file with a file editor. Locate the non data bytes
before and after each record. Use stream i/o as in g95. Read the
non-data prefix bytes. Read the data. Read the non-data suffix bytes.
Lather, rinse, repeat.
As I mentioned, I just touched Fortran and I have such an urgent task.
Any detailed help such as some lines of codes will be appreciated a lot!
"Adding manpower to a late software project makes it later." (Fred
Brooks).
.
- References:
- help for reading a binary file
- From: phywho
- Re: help for reading a binary file
- From: robin
- Re: help for reading a binary file
- From: phywho
- help for reading a binary file
- Prev by Date: Re: Save an array to memory for another program to read it
- Next by Date: Re: GUI for fortran
- Previous by thread: Re: help for reading a binary file
- Next by thread: Re: help for reading a binary file
- Index(es):
Relevant Pages
|