Read the second argument and match it with registered subcommands.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(cla_t), | intent(inout) | :: | cla |
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