Next: MVBITS, Previous: MODULO, Up: Intrinsic Procedures
MOVE_ALLOC — Move allocation from one object to anotherMOVE_ALLOC(SRC, DEST) moves the allocation from SRC to
DEST.  SRC will become deallocated in the process.
     CALL MOVE_ALLOC(SRC, DEST)
     | SRC | ALLOCATABLE,INTENT(INOUT), may be
                      of any type and kind. | 
| DEST | ALLOCATABLE,INTENT(OUT), shall be
                      of the same type, kind and rank as SRC | 
          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