Re: Overload problem




leaf schreef:

I use g95 to compile the code below and met an error:

*Error:Ambiguous interfaces 'print_try4' and 'print_try3' in
generic
interface 'print_try'
at (1)*

How to solve this problem? Thanks in advance!


If you do not use the allocatable and pointer properties
in these subroutines, then there is no need to specify
them: there is no need to have two different versions.

BTW, the allocatable attribute is not allowed on dummy
arguments, IIRC, unless the compiler allows it as an
extension.

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.

Regards,

Arjen

.