Internal procedures as dummy arguments in gfortran?
Miguel Hermanns
hermanns@tupi.dmt.upm.es
Wed Sep 23 12:49:00 GMT 2009
Hi Paul,
As Daniel was guessing in his email, many problems can be written very
clean and easily with the use of internal procedures as dummy arguments.
The integral is only one case. We have many of them in our codes.
Another typical example is searching for the solution of f(x) = 2, where
f(x) is a dummy argument and you have a great validated Newton
subroutine for solving g(x) = 0.
It is clear after reading the note pointed by Tobias, and I was not
aware of, that recursion makes life hard. In any case, tracking the
correct internal procedure should not be different from tracking the
correct copy of the local variable, or?
The compiler by intel is precisely the one we use and where it is
allowed, and I'm looking forward to be able to compile with gfortran so
that I can run the codes on any system.
Greetings from Madrid,
Miguel
Paul Richard Thomas wrote:
> Hola Miguel,
>
>
>> I know that internal procedures cannot be used as dummy arguments, since it
>> is forbidden in the fortran standard. I have also seen that this prohibition
>> has been introduced in gfortran through a patch by Paul Thomas.
>
>
> I have no memory of this at all; however, I see that it was introduced
> by yours truly to fix PR20861.
>
> To my astonishment, given some of the remarks, changing the error to
> an error on notification works just fine on FC9/i386 :-)
>
> I'll try it on some other systems tonight.
>
> Cheers
>
> Paul
>
More information about the Fortran
mailing list