End of record marker - 32 vs. 64 bit
- From: "Chris Theis" <christian.theis@xxxxxxxxxxxxxx>
- Date: Wed, 28 Feb 2007 18:51:35 +0100
Hello all,
I'm currently dealing with some questions regarding unformatted binary files
on 32 & 64 bit platforms, and probably one of the experienced FORTRAN
programmers might be able to shed some light on this issue. AFAIK records
are delimited by record length markers which are of the size of an integer.
On a 32 bit machine this will be 4 bytes, whereas on a 64 bit machine it
will give me 8 bytes. Simple tests which I performed using g77 on both
platforms showed that this basically prevents sharing binary data files, as
the files created with executables compiled under 64 bits cannot be read by
executables under 32 bits and vice versa. My question is whether the record
length marker is specified to be of integer size in the standard or what the
FORTRAN standard says on this issue? Furthermore, does anybody know how to
overcome this problem? I've heard that there are compilers that have
switches to take care of this problem, but I'm bound to g77 so that's not
really an option.
Thanks a lot
Chris
.
- Follow-Ups:
- Re: End of record marker - 32 vs. 64 bit
- From: Steve Lionel
- Re: End of record marker - 32 vs. 64 bit
- Prev by Date: Re: Array Constructors
- Next by Date: Re: Array Constructors
- Previous by thread: optional argument versus subroutine overloading
- Next by thread: Re: End of record marker - 32 vs. 64 bit
- Index(es):