cla__read_sub_subcommand Subroutine

private subroutine cla__read_sub_subcommand(cla)

Read the third argument and match it with registered sub-subcommands.

Type Bound

cla_t

Arguments

Type IntentOptional Attributes Name
class(cla_t), intent(inout) :: cla

Source Code

   subroutine cla__read_sub_subcommand(cla)
      implicit none
      class(cla_t), intent(inout) :: cla

      character(:), allocatable :: cmd
      integer :: i

      if (cla%arg_info%argc < 3) return

      cmd = trim(cla%arg_info%arg(3)%v)

      do i = 1, size(cla%sub_cmd%subc)
         if (cmd == cla%sub_cmd%subc(i)) then

            call cla%sub_sub_cmd%set_name(cmd)
            return
         end if
      end do
   end subroutine cla__read_sub_subcommand