max_chars_len Function

private elemental function max_chars_len(self)

Return the maximum number of characters between option-name/option-values on all options.

Arguments

TypeIntentOptionalAttributesName
class(section), intent(in) :: self

Section data.

Return Value integer(kind=I4P)

Inquire result.


Contents

Source Code


Source Code

  elemental function max_chars_len(self)
  !< Return the maximum number of characters between option-name/option-values on all options.
  class(section), intent(in) :: self          !< Section data.
  integer(I4P)               :: max_chars_len !< Inquire result.
  integer(I4P)               :: o             !< Counter.

  max_chars_len = MinI4P
  if (allocated(self%options)) then
    do o=1, size(self%options, dim=1)
      max_chars_len = max(max_chars_len, self%options(o)%name_len(), self%options(o)%values_len())
    enddo
  endif
  endfunction max_chars_len