Fortran Wiki
Dynamic memory allocation

The allocate statement, introduced in Fortran 90, allows dynamic allocation of memory for variables with the allocatable attribute.

Example Code