people's expectations

Manfred Schwarb manfred99@gmx.ch
Wed Jan 16 08:41:00 GMT 2019


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)

external declares j as a procedure, so no assignment allowed.


Or the very same error as for

      subroutine bar
      real, intrinsic :: sin
      sin=1.0
      print *, sin, sin(0.5)
      end subroutine bar

Error: VARIABLE attribute of 'sin' conflicts with PROCEDURE attribute at (1)

I.e. for "intrinsic" an procedure attribute is set,
but for "external" this seems to be missing. 



More information about the Fortran mailing list