This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

Re: unformatted input from files in g77?


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


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