read binary file written in fortran format 
Author Message
 read binary file written in fortran format

Hallo out there !

I have a problem with a binary data file that is written with
fortran.  I assume it is written on a 32 bit machine.

The person i got the data file from told me that the fortran
write format was:

5A2, 4F10.1, 2F7.1, 2I4
I7, 16F7.1 / 17F7.1

How do read this with a C-program ?  I started to read this with
fgets into a buffer.  But when I continued to unpack the buffer
with sscanf I ran into problem.  I'm sure there must be many clever
solutions to this problem, but I haven't found any books that makes
this direct connection between fortran and C.

I would be most greatful for a solution.  If you could email solutions
to me, it would be best since I'm not a regular attender of this
group.  I will post the solutions that works back to this group.

Thanks in advance !


Department of Photogrammetry             (Internet)
Royal Institute of Technolgy                    
S-100 44  STOCKHOLM, SWEDEN.             Tel. +46 8 790 86 33 (office)

--

Department of Photogrammetry             (Internet)
Royal Institute of Technolgy                    
S-100 44  STOCKHOLM, SWEDEN.             Tel. +46 8 790 86 33 (office)



Tue, 17 Nov 1992 12:14:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Writing binary files in C to be read in MS FORTRAN 4.0

2. Reading a binary sequential Fortran written file by C/C++

3. Outlook *.msg file format and read / write *.pst file

4. Reading FORTRAN binary files from C

5. Reading FORTRAN binary files from C

6. reading and writing to binary files

7. Reading and Writing Ascii and Binary Files

8. read binary files written by VB with C

9. read/write structs, that use a pointer as a member, to a file (binary)

10. Help - Reading & Writing binary file

11. Help - Reading & Writing binary files with bitfields

12. Truncating a binary file opened for read and write

 

 
Powered by phpBB® Forum Software