list_routinereport_peek Function

public function list_routinereport_peek(list) result(value)

Returns the last element in the list. Is equivalent to: list_routinereport_get(list, list_routinereport_size(list))

Arguments

Type IntentOptional Attributes Name
type(list_routinereport_type), intent(inout) :: list

Return Value type(routine_report_type), POINTER


Source Code

FUNCTION list_routinereport_peek(list) RESULT(value)
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
   !! Returns the last element in the list.
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
   !! Is equivalent to: list_routinereport_get(list, list_routinereport_size(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(inout)  :: list
# 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_peek: list is not initialized.")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
    IF(list%size < 1) &
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
       DBCSR_ABORT("list_routinereport_peek: list is empty.")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"

# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
    value => list%arr(list%size)%p%value
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
END FUNCTION list_routinereport_peek