Fypp is a python based preprocessor to generate source code. It is usefull to overcome some Fortran weaknesses regarding array dimensions, types (and kind). Follow the instructions below to integrate into your CMake project. The following exmaple assumes the current project structure as: yourproject/ cmake/ utils.cmake src/ CMakelists.txt main.f90 subr.fpp common.fpp bin/ CMakelists.txt Create utils.cmake…

read more

Allocatable array is a dynamic array. It’s size is not know at compilation time. Therefore it is defined at execution time by using the keyword allocate(…). It’s life scope is kept where it is defined. Once the procedure/… reaches the end it is automatically deallocated (or released). Nevertheless, you should be careful when using allocatable…

read more

A pointer in computer programming is an object that refers to a memory address. In Fortran it is declared with the keyword pointer in its declaration. Additionaly its assignment is done with the => keyword. However, in order to have an array of pointers use the following form must be used: Do not fall into…

read more