Re: Overload problem




"leaf" <vuckerster@xxxxxxxxx> wrote in message
news:1156917573.440692.98210@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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)*


Basically, the pointer and allocatable attributes are NOT among those
properties of arguments that may be used to disambiguate procedure
references. Most typically, type and/or rank are used (a full list is in
"Fortran 95/2003 Explained", Section 5.18).

I see no obvious solution for the sample code. A full answer would depend on
what you really want to do.

HTH,

Mike Metcalf


.



Relevant Pages

  • Re: check if a descendent has a function
    ... > The only think that I have is a pointer to TObject. ... > And my object implement an interface. ... You shouldn't just keep references to TObjects. ...
    (borland.public.delphi.language.objectpascal)
  • Re: Question on LSP
    ... In a dynamically typed language it becomes ... Polymorphism remains because it is a class, no specific type of the class ... is bound to the pointer until run-time. ... Each object references its methods! ...
    (comp.object)
  • Re: C# DLL mittels COM-Interop aus C aufrufen
    ... Have u tried the IDispatch interface, which is used for those language ... which doesnot have capability of maintaining VTables. ... The __cplusplus symbol is defined automatically when you're compiling C ... appropriate function pointer type. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: Pointers in derived types, help needed
    ... subroutine/function must have an explicit interface. ... C is not a pointer. ... then probably the best thing to do is use allocatables. ...
    (comp.lang.fortran)
  • misc thing (my lang): vm handling of external objects
    ... it isn't really possible to pass vm references around outside the ... only the direct interface code will know anything about the vm. ... objects are untyped void pointers. ... another in the external codebase) will manage the export of vm references ...
    (comp.lang.misc)