Next: Array I/O
Up: Arrays
Previous: Allocatable Arrays
Heap storage can be reclaimed using the DEALLOCATE statement:
IF (ALLOCATED(ages)) DEALLOCATE(ages,STAT=ierr)
- it is an error to deallocate an array without the
ALLOCATE attribute or one that has not been previously
allocated space,
- there is an intrinsic function, ALLOCATED, which
returns a scalar LOGICAL values reporting on the status of an array,
- the STAT= field is optional but its use is recommended,
- if a procedure containing an allocatable array which does not have
the SAVE attribute is exited without the array being DEALLOCATE d
then this storage becomes inaccessible.
For more information, click here
Next: Array I/O
Up: Arrays
Previous: Allocatable Arrays
Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996Not for commercial use.