OOP Fortran, Type and Procedures in different files
问题 I was wondering whether it is possible to place the actual subroutines behind type bound procedures and the type definition in different files. EG: File A: Module TypeDef Type :: Test Integer :: a,b,c contains Procedure, Pass, Public :: add => SubAdd End Type Type(Test) :: Test Interface Subroutine SubAdd(this) Import TypeDef Class(TypeDef), Intent(InOut) :: this End Subroutine End Interface End Module File B: Module TypeRoutines use TypeDef Private :: SubAdd contains Subroutine SubAdd(this)