gfortran allows variable to be declared twice
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue May 2 16:44:00 GMT 2017
Please don't top-post. It loses context.
On Tue, May 02, 2017 at 04:29:53PM +0000, Vivek Rao via fortran wrote:
> The first two lines of the code were munged together. The code should be
>
> function foo(fp, m) result(ft)
> real , intent(in) :: fp(m)
> integer, intent(in) :: m
> integer :: m
> ft = 0.0
> end function foo
Add 'implicit none' to your code. You do use 'implicit none', right?
Or, invert the order of the 2nd and 3rd lines.
--
Steve
20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4
20161221 https://www.youtube.com/watch?v=IbCHE-hONow
More information about the Fortran
mailing list