This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77/f77
- To: Labao Lan <labaol at iri dot ldeo dot columbia dot edu>
- Subject: Re: g77/f77
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Tue, 02 May 2000 23:42:30 +0200
- CC: gcc at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <390F3700.3402C4E9@iri.ldeo.columbia>
Labao Lan wrote:
>
> I'm trying to port my Fortran codes from Dec/Unix to Linux box. I have
> two problems with the GNU g77/f77.
>
> 1. GNU g77 doesn't take a convert syntax which looks like that:
open(unit=10,form='unformatted',status='old',file=infile,convert='BIG_ENDIAN')
> or
> open(unit=10,form='unformatted',status='old',file=infile,convert='ENDIAN')
No, indeed, it doesn't, sorry.
> 2. GNU g77 doesn't take a readonly/writeonly syntax either.
>
> open(unit=5,file=infile,status='old',readonly,form='formatted')
Neither this one.
> Could you give me some suggestions about how I can modify the open list
> 'convert' and 'readonly' or any g77/f77 options can help to pass the
> compilation? Thanks.
The only way to convert little endian files -> big endian and vice versa
is to write a special program for it. g77 doesn't do it for you, alas.
g77 also doesn't know how to open a file "readonly". That's also not in
the Fortran 77 Standard. It might be you can just get away with
deleting "readonly", but we have had experience in the past with
programs that crucially depended on this property being true (i.e.
giving the wrong answers if "readonly" wasn't enforced).
We're sorry - this is all outside the Fortran 77 Standard and not
supported by g77 ...
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://xena.eas.asu.edu/~andy (under construction)