Overloading a subroutine means to redefine its internal functionality for a customized behavior. Overall it adapts the class new characteristics to already wide-spread Fortran functionalities (==, =, + ,-, …). Specifically, this post only focus on the operators (+,-,*,/). In the following example, mynumber is generic class to hold any type of an integer number.…

read more

Deferred procedures are those functions/subroutines that will be later implemented in a specific derived type. For instance, It can only be declared on abstract derived types. To illustrate it, our problem requires a generic class that enforces the equal (==) property. Fortran classes must implement/overload the generic ‘==’ so it is possible to compare them.…

read more