This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: unformatted input from files in g77?
- From: Tim Prince <tprince at computer dot org>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>, gcc at gcc dot gnu dot org
- Date: Fri, 15 Mar 2002 12:46:33 -0800
- Subject: Re: unformatted input from files in g77?
- References: <200203151908.OAA98018@bromo.msbb.uc.edu>
- Reply-to: tprince at computer dot org
On Friday 15 March 2002 11:08, Jack Howarth wrote:
> Hello,
> In recompiling a fortran program that builds
> fine under Irix's f77 compiler I noticed that
> g77 2.95.4 and 3.0.4 both choke on the following.
>
> READ(UNIT=13,*) UR(1), UR(2), UR(3)
>
> ...with the compile time error messsage...
>
> working3.f: In program `MAIN__':
> working3.f:144:
> READ(UNIT=13,*) UR(1), UR(2), UR(3)
> ^
> Invalid form for READ statement at (^)
>
>
> where UR are DOUBLE PRECISION variables and
> unit 13 is an file opened for reading. Oddly
> it appears that unformmatted input is allowed
> from the standard input...
>
> READ(*,*) UR(1), UR(2), UR(3)
>
> and unformatted output is allowed to both a
> file or standard output...
>
> WRITE(UNIT=13,*) UR(1), UR(2), UR(3)
>
> WRITE(*,*) UR(1), UR(2), UR(3)
>
> Is this a known issue in g77? I couldn't find a clear
> mention of this anywhere but the lack of unformatted
> input from files seems like a major lose of functionality.
> Thanks in advance for any information on this.
> Jack Howarth
I don't see what this has to do with unformatted input or output. In all
your examples you are specifying default formatting. I see that g77 is
rejecting the UNIT= keyword; doesn't it work with the older form, where
"UNIT=" is omitted? I don't have my f77 standard here, to see whether the
UNIT keyword was specified there; g77 has no support for keywords introduced
in f90.
--
Tim Prince