Re: Overload problem




Richard E Maine schreef:


I am not quite sure if the pointer attribute should be used to
identify the correct procedure. I expect it is, but others
will be able to confirm this.

I can't follow what you are saying here, so I can neither confirm nor
deny it.


I just meant whether the pointer attribute of an argument is one of the
criteria, along with type, rank and kind, that is used to characterise
the argument list. Michael's reply is clear about that: it is not.
So there is no way to distinguish subroutines a and b:

module some_module

interface c
module procedure a, b
end interface

contains

subroutine a( p )
integer, pointer :: p
end subroutine

subroutine b( p )
integer :: p
end subroutine

end module

Regards,

Arjen

.



Relevant Pages

  • Re: Copy-in/Copy-out
    ... -|declared as a target or pointer, it should be safe to assign a pointer ... -| Character, Intent:: str* ... -| End Interface ... -| Subroutine SubTarget! ...
    (comp.lang.fortran)
  • Re: Copy-in/Copy-out
    ... Compiling program unit SubNormal at line 90: ... procedure definition and A in interface body shall be the same. ... -|> declared as a target or pointer, it should be safe to assign a pointer ... -| Subroutine SubTarget! ...
    (comp.lang.fortran)
  • Re: Tests for non-recursive procedure passing itself as actual argument
    ... subroutine set_sub ... end interface ... end subroutine sub ... pointer ...
    (comp.lang.fortran)
  • Re: Kind of new to cray pointers
    ... a generic interface block (it can't be the name of a generic ... I can change what the generic name does by pointing the pointer at ... recursive subroutine qsort ... typetemp ...
    (comp.lang.fortran)
  • Tests for non-recursive procedure passing itself as actual argument
    ... "The interface of a subroutine or function with a separate result ... procedure, pointer:: get_sub ... get_sub => psub ...
    (comp.lang.fortran)