I am trying to make sense of a program written in Fortran 77 (or earlier) that uses a series of unformatted write statements to write mixed integer and real data to an output file. A second program reads that data and uses DOS graphics to display the results in a series of charts. I have the source code for the first program, and have compiled and run it using FTN95 personal edition. The second program uses mixed Fortran and C subroutines (Fortran routine to read the data and C routines to process/display it), which I have not been able to sucessfully create an executable yet. When I try to process the data output file with the old executable file provided with the source code, it bombs with no messages. A memory dump comparision of my output file with an old sample output file shows different mapping? of the data.
Example (first 2 write statements): WRITE (N60) NBODY,NCS,IBMX,IBMN,NRW,IMN,NMN,S,REFLGT WRITE (N60) (NELM(I),I=1,NBODY) New output: 24 04 00 00 00 01 00 00 00 04 00 00 00 01 00 00 00 05 00 00 00 00 00 00 00 02 00 00 00 82 DE 8B 3D EB AB AA 3D 24 10 22 00 00 00 22 00 00 00 22 Old output: 24 00 00 00 04 00 00 00 01 00 00 00 04 00 00 00 01 00 00 00 05 00 00 00 00 00 00 00 02 00 00 00 82 DE 8B 3D EB AB AA 3D 24 00 00 00 10 00 00 00 22 00 00 00 22 00 00 00 22 00 00 00 2200 00 00
The decimal values are: nbody = 4, NCS = 1, IBMX = 4, IBMN = 1, NRW = 5, IMN = 0, NMN = 2, S = 0.068295, REFLGT = 0.083330 NELM=34,34,34,34
I assume that the hex 24 10 (hex 24 00 00 00 10) are record separators in the old and new outputs.
My question is: Is there any compiler setting(s) that will restore the output to the old format without requiring me to change the program code? I am working with another guy on this and need to avoid changing the code if I can so we can get a valid baseline. Eventually, we will rewrite all of it in C++ or C#, but not yet.
I am doing this as an interesting exercise, because I haven't used Fortran since about 1985.
Thanks for any insight
Tom