Returns the last element in the list. Is equivalent to: list_timerenv_get(list, list_timerenv_size(list))
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(list_timerenv_type), | intent(inout) | :: | list |
FUNCTION list_timerenv_peek(list) RESULT(value) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" !! Returns the last element in the list. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" !! Is equivalent to: list_timerenv_get(list, list_timerenv_size(list)) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" TYPE(list_timerenv_type), intent(inout) :: list # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" TYPE(timer_env_type), POINTER :: value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" IF(.not. ASSOCIATED(list%arr)) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" DBCSR_ABORT("list_timerenv_peek: list is not initialized.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" IF(list%size < 1) & # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" DBCSR_ABORT("list_timerenv_peek: list is empty.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" value => list%arr(list%size)%p%value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" END FUNCTION list_timerenv_peek