list_callstackentry_get Function

public function list_callstackentry_get(list, pos) result(value)

Returns the value at the given position from the list.

Arguments

TypeIntentOptionalAttributesName
type(list_callstackentry_type), intent(in) :: list
integer, intent(in) :: pos

Position in the list - must fulfill 0 < pos < list_size+1 .

Return Value type(callstack_entry_type)


Contents


Source Code

FUNCTION list_callstackentry_get(list, pos) RESULT(value)
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F"
   !! Returns 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(in)  :: 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"
    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_get: 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_get: 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_get: pos > size")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F"

# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F"
    value = list%arr(pos)%p%value
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F"

# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_callstackentry.F"
END FUNCTION list_callstackentry_get