people's expectations

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Jan 16 16:21:00 GMT 2019


On Wed, Jan 16, 2019 at 09:41:32AM +0100, Manfred Schwarb wrote:
> Am 16.01.2019 um 01:47 schrieb Steve Kargl:
> > What are people's expectation for gfortran with this code:
> > 
> > subroutine bar
> >    integer, external :: j
> >    read(*,*) j
> >    print *, j()
> > end subroutine bar
> > 
> 
> i would expect the very same error as for
> 
>       subroutine bar
>       integer, external :: j
>       j=1
>       print *, j()
>       end subroutine bar
> 
> Error: Illegal assignment to external procedure at (1)
> 

Technically, it isn't an assignment.  The READ statement
causes an input-item to become defined.  Yes, I know it's
just semantics, but then again fixing the bug requires 
following the standard.

-- 
Steve



More information about the Fortran mailing list