cla__read_command Subroutine

private subroutine cla__read_command(cla)

Read the first argument and match it with registered commands.

Type Bound

cla_t

Arguments

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

Source Code

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

      character(:), allocatable :: cmd

      if (ubound(cla%arg_info%arg, dim=1) < 1) then
         cmd = ""
         return
      end if

      cmd = trim(cla%arg_info%arg(1)%v)
      if (cmd .in. all_cmds) then
         call cla%cmd%set_name(cmd)
      else
         call cla%cmd%set_name("")
      end if
   end subroutine cla__read_command