Re: What's the purpose of explicit interfaces?




"Joe Krahn" <jkrahn@xxxxxxxxx> wrote in message
news:yMXSf.39900$915.37925@xxxxxxxxxxxxxxxxxxx
An explicit interface seems useful, but it makes sense to put it in an
include file and allow the described routines to include the definitions
to verify them, as in C. It seems that the usual idea is to use modules
instead of definition headers. So, what is the use of writing out an
explicit interface? If it is sometimes useful, why not allow the described
routine to include and validate the accuracy of that definition?

Usually, an explicit interface is defined by placing the procedure in
question within a module or using it as an internal procedure. No further
work is necessary. The only time that it should be spelled out is when it
defines the interface of a procedure argument (MR&C, Section 5.12), or when
dealing with external procedures from legacy Fortran 77. Even there, an
eternal statement would suffice but allows no checks to be made.

Regards,

MikecMetcalf


.



Relevant Pages

  • Re: Whats the purpose of explicit interfaces? (Pun intended?)
    ... include file and allow the described routines to include the definitions to verify them, ... an explicit interface is defined by placing the procedure in question within a module or using it as an internal procedure. ... would put the compiler on notice that it should compile the code that ... legacy code should work correctly; this would be somewhat analogous to the C++ declaration ...
    (comp.lang.fortran)
  • Whats the purpose of explicit interfaces?
    ... An explicit interface seems useful, but it makes sense to put it in an include file and allow the described routines to include the definitions to verify them, as in C. ... Joe Krahn ...
    (comp.lang.fortran)
  • Re: Whats the purpose of explicit interfaces?
    ... include file and allow the described routines to include the definitions to verify them, ... what is the use of writing out an explicit interface? ...
    (comp.lang.fortran)
  • Re: Request for Comments: libarchive, bsdtar
    ... I've used automated tests to verify a few of the trickier ... I've also been collecting sample test archives to verify ... home-grown routines early in development ...
    (freebsd-arch)
  • Re: copying pascal disks how?
    ... > Boot an original copy of the Apple "BASICS" disk. ... > BASIC image into the RAM card faster than the DOS 3.3 System Master can ... Copy II Plus routines do verify on what it just ...
    (comp.sys.apple2)