list_routinereport_set Subroutine

public subroutine list_routinereport_set(list, value, pos)

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.

Arguments

TypeIntentOptionalAttributesName
type(list_routinereport_type), intent(inout) :: list
type(routine_report_type), intent(in), POINTER:: value
integer, intent(in) :: pos

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


Contents


Source Code

SUBROUTINE list_routinereport_set(list, value, pos)
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
   !! Assings the given value to the given position in the list.
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
   !! Thereby, the former value at that position gets overwritten.
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
   !! If the position is out of bounds, the program stops.
# 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, intent(in) :: value
# 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"
    IF(.not. ASSOCIATED(list%arr)) &
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
       DBCSR_ABORT("list_routinereport_set: 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_set: 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_set: pos > size")
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
    list%arr(pos)%p%value => value
# 21 "/__w/dbcsr/dbcsr/src/core/dbcsr_list_routinereport.F"
END SUBROUTINE list_routinereport_set