append_ga_long Subroutine

public subroutine append_ga_long(me, val, length)


Type IntentOptional Attributes Name
type(grw_longarray_type) :: me
integer(kind=long_k), intent(in) :: val
integer, intent(in), optional :: length

optional length to expand the array


proc~~append_ga_long~~CallsGraph proc~append_ga_long append_ga_long interface~expand~22 expand proc~append_ga_long->interface~expand~22 proc~expand_ga2d_real expand_ga2d_real interface~expand~22->proc~expand_ga2d_real

Called by

proc~~append_ga_long~~CalledByGraph proc~append_ga_long append_ga_long interface~append~13 append interface~append~13->proc~append_ga_long


Source Code

Source Code

  subroutine append_ga_long(me, val, length)
    type(grw_longarray_type) :: me !< array to append the value to
    integer(kind=long_k), intent(in) :: val !< value to append
    !> optional length to expand the array
    integer, intent(in), optional :: length

    ! value to append is larger than all existing ones,
    ! just put it to the end of the list, this captures
    ! also the case of empty lists.
    ! in this case foundpos = me%nvals + 1 holds.
    if (me%nvals+1 > me%containersize) then
      ! expand the array, if its boundary is reached
      call expand(me = me, length = length)
    end if

    me%nvals = me%nvals+1
    me%val(me%nvals) = val

  end subroutine append_ga_long