reading Fortran unformatted files
- To: mathgroup@smc.vnet.net
- Subject: [mg11786] reading Fortran unformatted files
- From: Paul Cally <cally@zeus.maths.monash.edu.au>
- Date: Sat, 28 Mar 1998 00:25:22 -0500
- Organization: Monash Uni
Greetings all. I would like to be able to read (and possibly write) unformatted fortran output files. The standard add-on package Utilities`BinaryFiles` is not the answer, since fortran unformatted output records (at least on unix machines) are padded at both ends with extra bytes. Most scientific software systems, e.g., idl, have a simple switch in their open statements to do this, but seemingly not Mathematica. Presumably, one would also need to specify BigEndian or LittleEndian, depending on which computer was being used. In principle, one could hack Utilities`BinaryFiles` to strip or append the necessary bytes. However, this assumes a knowledge of what these bytes actually are. Has anyone out there made such a hack, or some other workaround? -- Paul Cally -- +----------------------------------------------------------------+ |Dr. Paul Cally | Ph: +61 (0)3 9905-4471 | |Mathematics Department | Fax: +61 (0)3 9905-3867 | |Monash University | cally@zeus.maths.monash.edu.au | |Clayton, Victoria 3168 | or pcally@solar.stanford.edu | |AUSTRALIA | http://www.maths.monash.edu.au/~cally/ | +----------------------------------------------------------------+