Hi all,
I have a question: why doesn't gfortran allow passing an internal
procedure as an argument to another procedure, as in this example:
subroutine sub
call proc(f1)
call proc(f2)
contains
real function f1(x)
...
end function f1
end subroutine sub
real function f2(x)
...
end function f2
If we have a subroutine "proc" that expects an external function as
its argument, "call proc(f2)" is allowed by gfortran, while "call
proc(f1)" triggers an error like this:
Error: Internal procedure 'f1' is not allowed as an actual argument at (1)
g95 shows the same behaviour, but ifort doesn't complain about this at all.
Can anyone tell me what the reason for this restriction is?