From: peterson@fman.enet.dec.com (Bob Peterson)
Subject: Re: f77 comp option to swap bytes?
Date: 22 Mar 91 18:21:40 GMT [thread overview]
Message-ID: <1991Mar22.132140@fman.enet.dec.com> (raw)
In-Reply-To: traymund.669594979@uiwpl.ece.uiuc.edu
In article <traymund.669594979@uiwpl.ece.uiuc.edu>, traymund@uiuc.edu
(Tim Raymund) writes:
>Is there a f77 compiler option to swap byte order on i/o? I ran
>the same program on a DECstation 5000 and an HP 9000/835 (see program
>at the end) and the resulting files look like:
...
>We like to use binary file i/o as in the program, and it would
>be handy if a f77 compiler option could be set to make the
>files identical across systems.
Yes. The DEC Fortran V3.0 compiler might help. It is capable of byte
swapping and VAX<->IEEE conversion on binary I/O. The drawbacks of
this are that FORTRAN programmers sometimes equivalance a lot of data
in COMMON to a single integer vector, and then do I/O with the vector.
The conversions then may fail.
The experimental support allows you three options to control this: a
per-unit environment variable, a compiler option affecting all units,
and a new OPEN statement keyword, CONVERT. Details on request. We
haven't had enough experience with this to catch all the gotchas. One
gotcha: the binary data may be converted, but the binary record formats
have to be the same as well. We think we match formats pretty well,
but like I said, we're in learn mode.
\bob
prev parent reply other threads:[~1991-03-22 18:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-03-21 22:36 f77 comp option to swap bytes? Tim Raymund
1991-03-22 4:46 ` Stephen Tihor
1991-03-22 12:46 ` Jim Gettys
1991-03-22 18:21 ` Bob Peterson [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