group_key_list Function

private function group_key_list(g) result(names)

All key names of a group as a char array.

Arguments

Type IntentOptional Attributes Name
type(nml_group_t), intent(in) :: g

Return Value character(len=:), allocatable, (:)


Called by

proc~~group_key_list~~CalledByGraph proc~group_key_list group_key_list proc~apply_one_pair apply_one_pair proc~apply_one_pair->proc~group_key_list proc~parse_group_body parse_group_body proc~parse_group_body->proc~apply_one_pair proc~dispatch_group dispatch_group proc~dispatch_group->proc~parse_group_body proc~parse_from_lines parse_from_lines proc~parse_from_lines->proc~dispatch_group proc~parse_file parse_file proc~parse_file->proc~parse_from_lines proc~schema_parse_lines nml_schema_t%schema_parse_lines proc~schema_parse_lines->proc~parse_from_lines

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: mlen
integer, private :: nk

Source Code

   function group_key_list(g) result(names)
      !! All key names of a group as a char array.
      type(nml_group_t), intent(in) :: g
      character(len=:), allocatable :: names(:)
      integer :: nk, i, mlen

      nk = 0
      if (allocated(g%keys)) nk = size(g%keys)
      mlen = 1
      do i = 1, nk
         mlen = max(mlen, len(g%keys(i)%key%name))
      end do
      allocate (character(len=mlen) :: names(nk))
      do i = 1, nk
         names(i) = g%keys(i)%key%name
      end do
   end function group_key_list