get_accepted Function

function get_accepted(p)

count of all the parts in the set

Arguments

Type IntentOptional Attributes Name
type(part), intent(in) :: p

Return Value integer(kind=ip)


Called by

proc~~get_accepted~~CalledByGraph proc~get_accepted problem_19b::get_accepted proc~process~2 problem_19b::process proc~process~2->proc~get_accepted proc~process~2->proc~process~2 program~problem_19b problem_19b program~problem_19b->proc~process~2

Source Code

        integer(ip) function get_accepted(p)
            !! count of all the parts in the set
            type(part),intent(in) :: p
            get_accepted =  (1 + (p%xmas(1)%v(2) - p%xmas(1)%v(1)))* &
                            (1 + (p%xmas(2)%v(2) - p%xmas(2)%v(1)))* &
                            (1 + (p%xmas(3)%v(2) - p%xmas(3)%v(1)))* &
                            (1 + (p%xmas(4)%v(2) - p%xmas(4)%v(1)))
        end function get_accepted