An allocatable array is the same as a dynamic array. Its size is not fixed therefore it is not known at compilation time. It is defined at execution time. It has several advantages compared to an explicit shape. The most important of all is its flexibility. It is also more memory efficient because it is…
read moreFypp preprocessor generates Fortran code based on Python language. However, in some cases it is not straightforward. Read below to discover how to create higher level functions. Let’s say our program requires to allocate an array for N supported ranks. dim is an array with the size of each rank. To make it possible We…
read moreAllocatable 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