47#include "implicit_f.inc"
51 INTEGER,
DIMENSION(:),
POINTER :: ptr,IREALLOCATE
52 INTEGER,
intent(in) :: new_size
56 INTEGER :: old_size, ierr
61 IF(.NOT.
ASSOCIATED(ptr))
RETURN
64 ALLOCATE(ireallocate(1:new_size), stat=ierr)
65 IF(ierr /= 0) stop
"memory allocation error"
67 old_size =
min(
SIZE(ptr), new_size)
68 ireallocate(1:old_size) = ptr(1:old_size)
85#include "implicit_f.inc"
91 INTEGER,
intent(in) :: new_size
95 INTEGER :: old_size, ierr
100 IF(.NOT.
ASSOCIATED(ptr))
RETURN
104 IF(ierr /= 0) stop
"memory allocation error"
106 old_size =
min(
SIZE(ptr), new_size)
pointer jreallocate(ptr, new_size)
integer function, dimension(:), pointer ireallocate(ptr, new_size)