Returns the last element in the list and removes it. Is equivialent to: value = list_callstackentry_get(list, list_callstackentry_size(list)) call list_callstackentry_del(list, list_callstackentry_size(list))
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(list_callstackentry_type), | intent(inout) | :: | list |
FUNCTION list_callstackentry_pop(list) RESULT(value) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! Returns the last element in the list and removes it. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! Is equivialent to: # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! value = list_callstackentry_get(list, list_callstackentry_size(list)) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" !! call list_callstackentry_del(list, list_callstackentry_size(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" TYPE(callstack_entry_type) :: value # 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_pop: list is not initialized.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" IF(list%size < 1) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" DBCSR_ABORT("list_callstackentry_pop: list is empty.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" value = list%arr(list%size)%p%value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F" deallocate(list%arr(list%size)%p) # 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" END FUNCTION list_callstackentry_pop