02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>HP</strong> <strong>Fortran</strong> statements<br />

DEALLOCATE<br />

Examples<br />

The following example declares a complex array with the POINTER attribute. The ALLOCATE<br />

statement allocates target space to the array at run-time; the amount is determined by the<br />

input values to the READ statement. Later in the program, the DEALLOCATE statement will<br />

recover the space.<br />

COMPLEX, POINTER :: hermitian (:, :)<br />

...<br />

READ *, m, n<br />

ALLOCATE (hermitian (m, n))<br />

...<br />

DEALLOCATE (hermitian, STAT = ierr)<br />

Related statements<br />

ALLOCATABLE, ALLOCATE, NULLIFY, andPOINTER<br />

Related concepts<br />

For related information, see the following:<br />

284<br />

“Pointers” on page 49<br />

“Allocatable arrays” on page 62<br />

The descriptions of the ALLOCATED and ASSOCIATED intrinsics are described in<br />

Chapter 11, “Intrinsic procedures,” on page 467.<br />

Chapter 10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!