Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | arg | |||
character(len=LEN_CMD), | intent(in) | :: | cmd_list(:) |
pure function does_command_exist(arg, cmd_list) result(res) implicit none character(*), intent(in) :: arg character(LEN_CMD), 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)) if (res) return end do end function does_command_exist