From: lovell@sdr.slb.com (John Lovell)
Subject: Re: byte swapping to get data readable on a dec
Date: 16 Nov 1994 04:06:29 GMT [thread overview]
Message-ID: <3ac0g5$sns@hermes.ridgefield.sdr.slb.com> (raw)
In-Reply-To: EJH.94Nov10084407@larry.gsfc.nasa.gov
In article 94Nov10084407@larry.gsfc.nasa.gov, ejh@larry.gsfc.nasa.gov (Edward Hartnett) writes:
>
> We here distribute some floating point (IEEE) data to various
> users. We generate it on a cray and various workstations, and now we
> have a user who wants to read the data from a fortran program on a
> decstation. He complains that he can't do this because of the order
> that the bytes are stored in. Is there any hope that we can help him
> solve his problem?
In the FORTRAN program, open the file as
open(file='file.dat', convert='big_endian', form='unformatted',....)
and any big_endian integer or IEEE floats will be converted automatically
as the files are read in. If all of the unformatted files are big_endian
you can alternatively do this at compile time as
FORTRAN/CONVERT=BIG_ENDIAN
On an AXP, if you compile the Fortran source with the flag /FLOAT=IEEE then
everything will be done in IEEE format.
Regards,
John
p.s. there is also a /CONVERT=CRAY option which is big-endian integer and
"CRAY" floating point for REAL*8 and COMPLEX*16 (with no single precision).
prev parent reply other threads:[~1994-11-16 4:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-10 13:44 byte swapping to get data readable on a decstations Edward Hartnett
1994-11-10 16:07 ` Steve Lionel
1994-11-10 16:47 ` Chuck Campbell
1994-11-11 9:31 ` Ken Bell
1994-11-14 21:55 ` Eric Frey
1994-11-11 23:18 ` Ken Bell
1994-11-14 14:19 ` Roger Grady
1994-11-16 4:06 ` John Lovell [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox