fdoc

subroutinelabel_resultsprivate

subroutine label_results(ranks, primary, relative, types, result_ranks, labels)

The text of each result.

Arguments

NameTypeIntentAttributesDescription
ranksintegerindimension(:,:)

the rank of each argument of each procedure

primaryintegerin

the argument of the columns, or 0

relativecharacter(len=*)in

its rank, as text

typestype(string_t)indimension(:)

the type of each result

result_ranksintegerindimension(:)

the rank of each result

labelstype(string_t)inoutdimension(:)

the text of each result

Calls

Source

Show the code
subroutine label_results(ranks, primary, relative, types, result_ranks, labels)
    integer, intent(in) :: ranks(:, :)                  !! the rank of each argument of each procedure
    integer, intent(in) :: primary                      !! the argument of the columns, or 0
    character(len=*), intent(in) :: relative            !! its rank, as text
    type(string_t), intent(in) :: types(:)              !! the type of each result
    integer, intent(in) :: result_ranks(:)              !! the rank of each result
    type(string_t), intent(inout) :: labels(:)          !! the text of each result
    logical :: tied
    integer :: j, offset

    tied = .false.
    offset = 0
    if (primary > 0) then
        offset = result_ranks(1) - ranks(primary, 1)
        tied = all(result_ranks - ranks(primary, :) == offset) .and. any(result_ranks /= result_ranks(1))
    end if
    do j = 1, size(types)
        call rank_label(types(j)%s, result_ranks(j), .false., tied, relative, offset, labels(j)%s)
    end do
end subroutine label_results

Graphs

Calls

Called by