subroutinelabel_resultsprivate
subroutine label_results(ranks, primary, relative, types, result_ranks, labels)
The text of each result.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| ranks | integer | in | dimension(:,:) | the rank of each argument of each procedure |
| primary | integer | in | the argument of the columns, or 0 | |
| relative | character(len=*) | in | its rank, as text | |
| types | type(string_t) | in | dimension(:) | the type of each result |
| result_ranks | integer | in | dimension(:) | the rank of each result |
| labels | type(string_t) | inout | dimension(:) | 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