Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | arg | |||
type(cmd_t), | intent(in) | :: | cmd_list(:) |
pure function does_command_exist_type_cmd(arg, cmd_list) result(res) implicit none character(*), intent(in) :: arg type(cmd_t), intent(in) :: cmd_list(:) logical :: res integer :: i res = .false. do i = lbound(cmd_list, dim=1), ubound(cmd_list, dim=1) res = res .or. trim(arg) == trim(cmd_list(i)%get_name()) if (res) return end do end function does_command_exist_type_cmd