NCEPLIBS-g2  3.5.0
re_alloc Module Reference

Reallocate memory, preserving contents. More...

Data Types

interface  realloc
 

Functions/Subroutines

subroutine realloc_c1 (c, n, m, istat)
 This subroutine reallocates a character array, preserving its contents. More...
 
subroutine realloc_i (c, n, m, istat)
 This subroutine reorganize integer type data in memory into one one dimensional array. More...
 
subroutine realloc_r (c, n, m, istat)
 This subroutine reallocates an integer array, preserving its contents. More...
 

Detailed Description

Reallocate memory, preserving contents.

This module contains two subroutines to reallocate integer, and character arrays in memory, preseving the existing contents of the array.

Author
Stephen Gilbert
Date
2000-10-01

Function/Subroutine Documentation

◆ realloc_c1()

subroutine re_alloc::realloc_c1 ( character(len=1), dimension(:), pointer  c,
integer, intent(in)  n,
integer, intent(in)  m,
integer, intent(out)  istat 
)

This subroutine reallocates a character array, preserving its contents.

Parameters
[in,out]cpointer for data in memory.
[in]ndimension for data in memory. This is how much data is currently stored in the array.
[in]mdimension for allocatable array. This is the size the array will be after the allocation of memory.
[out]istatscalar INTEGER variable for allocate.
  • 0 No error.
  • 10 Incorrect dimension.
  • other Allocation error.
Author
Stephen Gilbert
Date
2000-10-01

Definition at line 36 of file realloc.F90.

◆ realloc_i()

subroutine re_alloc::realloc_i ( integer, dimension(:), pointer  c,
integer, intent(in)  n,
integer, intent(in)  m,
integer, intent(out)  istat 
)

This subroutine reorganize integer type data in memory into one one dimensional array.

Parameters
[in,out]cpointer for data in memory.
[in]ndimension for data in memory.
[in]mdimension for allocatable array.
[out]istatscalar INTEGER variable for allocate.
Author
Stephen Gilbert
Date
2000-10-01

Definition at line 125 of file realloc.F90.

◆ realloc_r()

subroutine re_alloc::realloc_r ( real, dimension(:), pointer  c,
integer, intent(in)  n,
integer, intent(in)  m,
integer, intent(out)  istat 
)

This subroutine reallocates an integer array, preserving its contents.

Parameters
[in,out]cpointer for data in memory.
[in]ndimension for data in memory. This is how much data is currently stored in the array.
[in]mdimension for allocatable array. This is the size the array will be after the allocation of memory.
[out]istatscalar INTEGER variable for allocate.
  • 0 No error.
  • 10 Incorrect dimension.
  • other Allocation error.
Author
Stephen Gilbert
Date
2000-10-01

Definition at line 83 of file realloc.F90.