It's a little bit of a misleading name. The "argument keywords"
used in a call are the "argument names" in the subroutine statement.
You'd want something like
> interface
> subroutine test(first,second, third)
> real, intent(in) :: first
real, intent(inout), optional :: second, third
> end interface
and then
call test (third= b, first = a)
In general, if you put your subroutines in a module and then
"use" the module you won't need the interface block and the
argument keywords will still be available.
Dick Hendrickson
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
> _____________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|