Search code examples
fortranfortran95

Recursive Fortran subroutines and interfaces


Do I need to define an interface for recursive Fortran95 (and above) subroutines? In a library, does it make a difference if the subroutine is exported to the user?


Solution

  • RECURSIVE is not an attribute that requires an explicit interface, as it doesn't affect how the procedure is called. For more information on explicit interfaces, see an article I wrote a while back on the topic: https://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again