Since the interface for a module procedure is known implicitly to the
compiler, you shouldn't have to do anything at all. Were you having
difficulty? In other words, it's as if the interface statement were
written for you. That;s what is meant by "provided implicitly".
In this whole interface thing, always keep in mind this: what does the
computer know? In a module, the body of the proc. is available, so the
compiler can easily look at the proc. code and see what the keywords
should be and their type, etc. But remember that not all procedures may
be in a module; they could be in a file by themselves. If that's the
case, then the computer should be told what the interface looks like in
an interface block, which you typed.
However, I was not aware you could use argument keywords with
non-optional arguments. (I'm ready to be corrected on that score).
Alvaro
Aleksandar Donev wrote:
> Hello,
>
> How does one give argument keywords to module procedures?
>
> The books I have say that argument keywords must be provided in
> interfaces, as in:
>
> interface
> subroutine test(first=a)
> real, intent(in) :: a
> end interface
>
> but also that explicit interfaces should not be given for module
> procedures since they are provided implicitly. So how does one use
> module procedures with argument keywords?
>
> Thanks a lot,
> Aleksandar
>
> --
> _____________________________________________
> Aleksandar Donev
> Physics Department
> Michigan State University
> East Lansing, MI 48824-1116
> E-mail: [log in to unmask]
> Work phone: (517) 432-6770
> _____________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|