This is the mail archive of the mailing list for the GCC project.

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

Re: fortran binary reads

----- Original Message -----
From: "David E. Dietrich" <>; "David E.
Dietrich" <>
To: <>
Cc: "David E. Dietrich" <>
Sent: Monday, October 01, 2001 4:16 AM
Subject: fortran binary reads

> Dear GNU Support:
> I have a Fortran applications problem that may have an easy
> The fortran compiler that came with my Suse Linux applications
> GNU Fortran 0.5.25 20010315 (release)
> has problems reading standard binary data files.  These files
are the
> standard single precision --- 8 byte word length ---
> data sets used by atmospheric and ocean scientists.
> I think the problem may be related to the fortran compiler
assuming they
> are "c" language binary files, which I am told are different
from their
> fortran counterparts.
> Please advise if you know of a solution.  Thank you very much
for your
> kind consideration,
> Sincerely, David E. Dietrich
If you are using sequential binary files (Fortran unformatted),
your difficulty is likely to be with byte order.  AFAIK, linux
tradition avoids attempts to solve this portability problem in
the language run-time libraries, as is done in several Unix
implementations.  Please read the information on this subject
under 'info g77'.  While it would appear desirable for Fortran
compilers to support opening files with big-endian byte order, to
implement such an extension is not trivial; thus the availability
of open source packages to deal with this problem.

 gcc avoids as much as possible dealing with run-time support
libraries; if you prefer to use a linux-vendor-specific version
of gcc/g77, you might ask your vendor whether they have an
interest in dealing with the problem.

This mail-list may not be as effective a forum for your question
as one of the general Fortran-oriented lists.

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