Removes the value at the given position from the list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(list_callstackentry_type), | intent(inout) | :: | list | |||
integer, | intent(in) | :: | pos |
Position in the list - must fulfill 0 < pos < list_size+1 . |
SUBROUTINE list_callstackentry_del(list, pos) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! Removes the value at the given position from the list. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" TYPE(list_callstackentry_type), intent(inout) :: list # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" INTEGER, intent(in) :: pos # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! Position in the list - must fulfill 0 < pos < list_size+1 . # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" INTEGER :: i # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF(.not. ASSOCIATED(list%arr)) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_del: list is not initialized.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF(pos < 1)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_det: pos < 1") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF(pos > list%size)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_det: pos > size") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" deallocate(list%arr(pos)%p) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" do i=pos, list%size-1 # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" list%arr(i)%p => list%arr(i+1)%p # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" end do # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" list%size = list%size - 1 # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" END SUBROUTINE list_callstackentry_del