Use of interface within module?

From: Andy (andy_at_ideafix.litec.csic.es)
Date: 10/22/03


Date: Wed, 22 Oct 2003 18:39:44 +0200

I have a compiler disagreement. Should the interface be used within the
module? and, if not, what is the reasoning?

module m

   type a
     ...
   end type

   type b
     ...
   end type

   interface plot
     module procedure plot_a, plot_b, plot_ab
   end interface

contains

   subroutine plot_a( a )
     type(a_t) :: a
     ...
   end

   subroutine plot_b( b )
     type(b_t) :: b
     ...
   end

   subroutine plot_ab( a, b )
     type(a_t) :: a
     type(b_t) :: b
     call plot(a) ! Should this work?
     call plot(b) ! Should this work?
     ...
   end

end module



Relevant Pages

  • Re: cyclic dependency
    ... I have to say I don't understand the reasoning behins this circular ... assemblies, which seems reasonable. ... but I see cyclical references between ... to implement the Separated Interface Pattern. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Sorry to chime in but...
    ... I have read the reasoning behind the new interface and I agree ... I did not have a choice in my upgrade, ... productivity and still allows me to adjust to the new interface. ... I felt the same way when I first saw the ribbon, but after using it for a while I found I actually could get to things quicker than with the old menus. ...
    (microsoft.public.excel.newusers)
  • protected interface members
    ... I know this is not supported, but i'm just looking for some reasoning and ... outside world, only to derived classes. ... Public interfaces of course do the job, but i don't want to expose internals ... i want to create an interface for members that can be inherited ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: "Listen on" semantics
    ... that arrive on that specific interface and it drops all packets arriving ... the worst thing may well be a screwed-up clock. ... Your reasoning makes sense, but you are reasoning from the assumption that there are no bugs in the code. ... Your reasoning also assumes that every incoming packet is playing by the rules, or at least that the code can handle all kinds of malformed packets, that it will never cut its virtual fingers on the sharp edges of packets that were crafted on purpose by malicious minds. ...
    (comp.protocols.time.ntp)
  • Re: event object = transfer object?
    ... ie does the reasoning go, "how else would you implement one?" ... Every object has an interface, it may however not implement an explicit ... Since EventObject already exists, why reinvent the wheel, and add a new ...
    (comp.lang.java.programmer)