MOVE_ALLOC(3f)

DESCRIPTION
MOVE_ALLOC(FROM, TO) moves the allocation from FROM to TO. FROM will become deallocated in the process.

STANDARD
Fortran 2003 and later

CLASS
Pure subroutine

SYNTAX
CALL MOVE_ALLOC(FROM, TO)

ARGUMENTS

FROM ALLOCATABLE, INTENT(INOUT), may be of any type and kind. TO ALLOCATABLE, INTENT(OUT), shall be of the same type, kind and rank as FROM.

RETURN VALUE
None

EXAMPLE
          program test_move_alloc
              integer, allocatable :: a(:), b(:)

              allocate(a(3))
              a = [ 1, 2, 3 ]
              call move_alloc(a, b)
              print *, allocated(a), allocated(b)
              print *, b
          end program test_move_alloc

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).