This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reading 32bit unformatted files in 64bit systems


Hi Ignacio,

2011/12/30 Ignacio Fernández Galván <jellby@yahoo.com>:
> Oh, I'm sorry... I removed the length block (00 00 00 54). The file is SEQUENTIAL UNFORMATTED. I think I have found out the problem is the endianness of the data. It's strange because I have never had an endianness problem with all the computers I've used, and no reference I have found about the DCD format mentions the endianness (which seems to be big-endian in this sample file).

endianness is a property of the machine on which you run the program.
It is (most of the time) beyond the
control of the program itself. The Intel Fortran compiler offers an
extension to read/write files with a different
endianness than that of the machine. In this case it would be very
useful to have that in gfortran too (but it
remains an extension).

Regards,

Arjen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]