Re: optional or interface



On 3 jun, 18:30, Paul van Delst <Paul.vanDe...@xxxxxxxx> wrote:
Richard Maine wrote:
Paul van Delst <Paul.vanDe...@xxxxxxxx> wrote:

Erm.. I'm not quite sure what you mean here. I use INTERFACE for
overloading, of course, but that's it. I don't use interface blocks (don't
see the point since I use modules). What do you mean by similar? Specific
to generic procedures?

You mean that you don't use interface bodies. An interface block is the
only way to define a generic. Yes, I realize that those two terms are
easy to confuse; I've regularly confused them myself.

Yep, you're right. I always confuse the terms. Thanks for catching that.

So, to be clear to the OP, I don't use interface bodies. (Keeping in mind that's a design
decision I made, not an indictment against interface bodies.)

cheers,

paulv

Interface bodies come in quite handy for situations where you can not
put the routine in a module:

- You only have the compiled version of a library
- The library is written in a different language (like C for instance)

By using such interface bodies you get the same validity checks as
with
modules, though it takes more work and you need to be careful in
specifying
the interfaces.

I have made it a rule for myself to put these interface bodies in a
module of
their own or part of a related module.

Regards,

Arjen
.



Relevant Pages

  • Re: compilation problem with module function interface definition
    ... > The module compiles cleanly with the interface block commented out. ... there is no need to repeat it in an interface body. ... About the only times you need interface bodies are for external ... the declaration of the type ...
    (comp.lang.fortran)
  • Re: interface blocks
    ... > interface block at least makes sense, ... hold the prototype for all subroutines. ... Interface bodies can ...
    (comp.lang.fortran)
  • Re: interface blocks
    ... I am considering building a generic interface ... Interface bodies can ... (the call, the procedure, and the interface body). ... and there are various annoyances in terms of writing the interface ...
    (comp.lang.fortran)
  • Re: optional or interface
    ... I don't use interface blocks (don't ... You mean that you don't use interface bodies. ... I always confuse the terms. ... So, to be clear to the OP, I don't use interface bodies. ...
    (comp.lang.fortran)
  • Re: optional or interface
    ... I don't use interface blocks (don't ... to generic procedures? ... So, to be clear to the OP, I don't use interface bodies. ...
    (comp.lang.fortran)