On 5 mei, 09:09, Klemens <jokulhl...@web.de> wrote:
> Hi Richard,
> thanks for your quick response !
> So I will not waste any time for changing from interfaces to a module.
> Cheers,
> Klemens
Maintaining routines in a module means that the interface
is maintained in a single place only!
The advantage is that changes to the interface of these
routines are automatically known to the compiler.
If you have interface blocks in the calling routines, there
will still be a possibility for mismatches.
Consider:
subroutine suba( x )
real :: x
...
end subroutine
and:
program test_suba
interface
subroutine suba( x, y )
real :: x, y
end subroutine
end interface
call suba( x, y )
end program
There is no "intrinsic" relationship between the
implementation of the routine and the interface block.
If however:
module moda
contains
subroutine suba( x )
real :: x
...
end subroutine
end module
and:
program test_suba
use moda
call suba( x, y )
end program
the compiler can "see" the mismatch.
It is up to you, but I think modules are preferrable.
Regards,
Arjen