Examples of using the object-oriented features in Fortran, taken from my presentation at RSECon 2019.
01-derived-type.f90
: Demonstration of the (non-OOP) derived types available since Fortran 9002-oop-features.f90
: Demonstration of the OOP features (encapsulation, inheritance, polymorphism) available since Fortran 200303-abstract-types.f90
: An example of using an abstract type to define an interface (here demonstrating the Strategy Pattern)04-lapack-wrapper.f90
: An example of using OOP to wrap cumbersome legacy Fortran routines (in this case, dgesvx from LAPACK)