User:HerrHartmuth/sandbox

Polymorphism
One can derive one type from another by using

Parallel Programming in Fortran
Parallel programming is included in the standard from Fortran 2008 onwards. Fortran builds on the technique Single Program Multiple Data (SPMD) and the use of coarrays, and images are the central building blocks.

Images
The execution of the program is split up over multiple processes which are dubbed images in Fortran. Each image has control over its own data and executes the same program. Nevertheless, the execution on each image might vary, i.e. one could use  statements that differ for individual images.

The following intrinsic functions are often used
 * : returns the current image number
 * : returns the total image count.

Derived data types
In Fortran one can derive structures off of other structures, so called derived data types. The derived types will have the features of the parent type as well as the newly added ones and the general syntax is

The following example shows different types of people within a company.

Memory management with pointers
In Fortran one can use pointers as some kind of alias for other data, e.g. such as a row in a matrix.

Pointer states
Each pointer is in one of the following states
 * undefined: right after definition if it has not been initialized
 * defined
 * null/not associated: not the alias of any data
 * associated: alias of some data.

The intrinsic function  distinguished between the second and third states.

Overview
We will use the following example: Let a pointer  be the alias of some real value.