One question
Dave Love
d.love@dl.ac.uk
Wed Aug 12 02:58:00 GMT 1998
>>>>> "Joe" == Joe Buck <jbuck@synopsys.com> writes:
>> From: "zhumin" <zhumin@public1.ptt.js.cn>
>> Date: Fri, 15 May 1998 14:11:51 +0800
>>
>> Could you help me with this question : how can I access data file
>> with standard workstation 32-bit IEEE binary format using egcs_g77 fortran
>> compiler under linux OS, I know there are some differences between
>> workstation IEEE format data and PC data ? so many thanks ...
>>
>> If you mean the IEEE-695 object file format, it is not a standard
>> workstation 32-bit format.
Joe> Are you sure that we aren't just talking about big-endian vs
Joe> little-endian here? There are no other differences I can think
Joe> of between "workstation IEEE format data" and "PC data".
I assume the question is about reading Fortran unformatted files
written on another system by a program compiled with another compiler.
In that case, the answer is that you can't in general do this, because
the basic file format may be different, apart from the endianness of
the data. Further, the g77 runtime doesn't have the ability to read
unformatted data written by g77 with a different byte order.
The recommended way to deal with binary data independent of compiler
and hardware is to use a Fortran-callable portable binary format. HDF
from NCSA is probably the one to go for. [The same sort of technique
could be used by the g77 runtime for unformatted files, but isn't
likely to be implemented any time soon.]
Sorry, I'm at fault for not yet having written up this FAQ for the
manual.
More information about the Gcc
mailing list