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. |
||
logical(kind=lp), | intent(inout), | allocatable | :: | v(:) |
Array to free |
subroutine l_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.
logical(lp), allocatable, intent(inout) :: v(:)
!! Array to free
integer(ip) :: istat, ltot
if(allocated(v)) then
ltot = size(v) * size_of_logical
deallocate(v, stat=istat)
call chk_free(string, ltot, istat)
end if
end subroutine l_free1