populate Subroutine

subroutine populate(nums, m)

Arguments

Type IntentOptional Attributes Name
integer(kind=ip), intent(in), dimension(3) :: nums
type(mapping), intent(inout) :: m

Called by

proc~~populate~~CalledByGraph proc~populate problem_5::populate program~problem_5 problem_5 program~problem_5->proc~populate

Source Code

    subroutine populate(nums, m)
        integer(ip),dimension(3),intent(in) :: nums  ! the three numbers from the line:
                                                     ! [dest range start, src range start, range length
        type(mapping),intent(inout) :: m ! structure to add this data to
        associate( dest => nums(1), source => nums(2), range => nums(3) )
            m%dest_start = [m%dest_start, dest]
            m%dest_end   = [m%dest_end,   dest+range-1]
            m%src_start  = [m%src_start,  source]
            m%src_end    = [m%src_end,    source+range-1]
        end associate
    end subroutine populate