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 assignment (=). In the following example, Mynumber is generic class to hold any type of real number. For that…
read more
by lincador
503
Valgrind is tool to analyze the memory on an application at runtime. For instance, It helps in the discovery memory issues. If it is not the case then random errors and/or behaviors might start showing up. It can be the case when working with pointers as they allow to do several tricks. Which it could…
read moreDeferred 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