cla__read_subcommand Subroutine

private subroutine cla__read_subcommand(cla)

Read the second argument and match it with registered subcommands.

Type Bound

cla_t

Arguments

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

Source Code

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

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

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

      do i = 1, size(cla%cmd%subc)
         if (cmd == cla%cmd%subc(i)) then
            call cla%sub_cmd%set_name(cmd)
            return
         end if
      end do
   end subroutine cla__read_subcommand