HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
DEALLOCATE
Chapter 10318
Examples
The following example declares a complex array with the POINTER attribute. The ALLOCATE
statement allocates target space to the array at run-time; the amount is determined by the
input values to the READ statement. Later in the program, the DEALLOCATE statement will
recover the space.
COMPLEX, POINTER :: hermitian (:, :)
...
READ *, m, n
ALLOCATE (hermitian (m, n))
...
DEALLOCATE (hermitian, STAT = ierr)
Related statements
ALLOCATABLE, ALLOCATE, NULLIFY, and POINTER
Related concepts
For related information, see the following:
“Pointers” on page 131
Allocatable arrays” on page 64
The descriptions of the ALLOCATED and ASSOCIATED intrinsics are described in
Chapter 11, “Intrinsic procedures,” on page 501.