Returns the value at the given position from the list.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(list_routinereport_type), | intent(in) | :: | list | |||
integer, | intent(in) | :: | pos |
Position in the list - must fulfill 0 < pos < list_size+1 . |
FUNCTION list_routinereport_get(list, pos) RESULT(value) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" !! Returns the value at the given position from the list. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" TYPE(list_routinereport_type), intent(in) :: list # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" INTEGER, intent(in) :: pos # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" !! Position in the list - must fulfill 0 < pos < list_size+1 . # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" TYPE(routine_report_type), POINTER :: value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" IF(.not. ASSOCIATED(list%arr)) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" DBCSR_ABORT("list_routinereport_get: list is not initialized.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" IF(pos < 1)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" DBCSR_ABORT("list_routinereport_get: pos < 1") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" IF(pos > list%size)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" DBCSR_ABORT("list_routinereport_get: pos > size") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" value => list%arr(pos)%p%value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F" END FUNCTION list_routinereport_get