You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a series of procedures in a number of SUBMODULEs. Each procedure requires its interface to be defined in the ancestor module.
The following refers to code in the ancestor module only, It does not refer to any changes in the submodules.
If many of these procedures have an identical interface (apart from the procedure name), it would be useful if the interfaces could be defined in a single ABSTRACT INTERFACE, and the resulting named interface used in subsequent PROCEDURE statements.
This really isn't related to submodules - what you'd like to do is use PROCEDURE(abstract_interface) instead of SUBROUTINE/FUNCTION in an interface block or a procedure definition. I can think of uses for this without submodules. (Note that in a submodule, you can simply say MODULE PROCEDURE xxx with the interface having been defined in the parent module.)
Given that compilers already have to support MODULE PROCEDURE, I don't see this as a difficult thing. The downside is that a reader has to go looking elsewhere for the declarations of the dummy arguments, something I find annoying.
The downside is that a reader has to go looking elsewhere for the declarations of the dummy arguments, something I find annoying.
Not more annoying than having to repeat and modify the same dummy argument declaration tens of times. Without this feature, the developer will use preprocessor include files... which doesn't make it less annoying for the reader.
Consider a series of procedures in a number of SUBMODULEs. Each procedure requires its interface to be defined in the ancestor module.
The following refers to code in the ancestor module only, It does not refer to any changes in the submodules.
If many of these procedures have an identical interface (apart from the procedure name), it would be useful if the interfaces could be defined in a single ABSTRACT INTERFACE, and the resulting named interface used in subsequent PROCEDURE statements.
I asked in the Intel Fortran Forum if this were possible, but it appears it is not: see https://software.intel.com/en-us/forums/intel-fortran-compiler/topic/842383
I have attached the example file showing my existing code.
test.f90.txt
The text was updated successfully, but these errors were encountered: