list_routinestat_get Function

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

Returns the value at the given position from the list.

Arguments

Type IntentOptional Attributes Name
type(list_routinestat_type), intent(in) :: list
integer, intent(in) :: pos

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

Return Value type(routine_stat_type), POINTER


Source Code

FUNCTION list_routinestat_get(list, pos) RESULT(value)
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
   !! Returns the value at the given position from the list.
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"

# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
    TYPE(list_routinestat_type), intent(in)  :: list
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
    INTEGER, intent(in) :: pos
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
      !! Position in the list - must fulfill 0 < pos < list_size+1 .
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
    TYPE(routine_stat_type), POINTER :: value
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"

# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
    IF(.not. ASSOCIATED(list%arr)) &
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
       DBCSR_ABORT("list_routinestat_get: list is not initialized.")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
    IF(pos < 1)&
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
       DBCSR_ABORT("list_routinestat_get: pos < 1")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
    IF(pos > list%size)&
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
       DBCSR_ABORT("list_routinestat_get: pos > size")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"

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

# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinestat.F"
END FUNCTION list_routinestat_get