version 0.6.0
mod_reallocate Module Reference

Generic routines to reallocate arrays. More...

Functions/Subroutines

subroutine reallocate_double_array (array, new_value)
 
subroutine reallocate_logical_array (array, new_value)
 

Detailed Description

Example:

integer, dimension(:), allocatable :: array
allocate(array(2))
array = [0,1]
! Append an integer to the array
call reallocate(array)
array(3) = 2
! Or, in short format:
call reallocate(array, 2)