Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(list_timerenv_type), | intent(inout) | :: | list | |||
type(timer_env_type), | intent(in), | POINTER | :: | value | ||
integer, | intent(in) | :: | pos |
Position in the list - must fulfill 0 < pos < list_size+1. |
SUBROUTINE list_timerenv_set(list, value, pos) # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" !! Assings the given value to the given position in the list. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" !! Thereby, the former value at that position gets overwritten. # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" !! If the position is out of bounds, the program stops. # 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, intent(in) :: value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" INTEGER, intent(in) :: pos # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" !! Position in the list - must fulfill 0 < pos < list_size+1. # 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_set: list is not initialized.") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" IF(pos < 1)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" DBCSR_ABORT("list_timerenv_set: pos < 1") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" IF(pos > list%size)& # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" DBCSR_ABORT("list_timerenv_set: pos > size") # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" list%arr(pos)%p%value => value # 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_timerenv.F" END SUBROUTINE list_timerenv_set