Free a 1-dimensional array of integers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
Human-readable description string of the deallocation operation, just for output purpose. |
||
integer(kind=ip), | intent(inout), | allocatable | :: | v(:) |
Array to free |
subroutine i_free1(string, v)
!! Free a 1-dimensional array of integers
character (len=*), intent(in) :: string
!! Human-readable description string of the deallocation
!! operation, just for output purpose.
integer(ip), allocatable, intent(inout) :: v(:)
!! Array to free
integer(ip) :: istat, ltot
if(allocated(v)) then
ltot = size(v) * size_of_int
deallocate(v, stat=istat)
call chk_free(string, ltot, istat)
end if
end subroutine i_free1