Whether arg is a -s form. A bare - is not, and neither is a
negative number, which must be able to reach a positional.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | arg |
pure function is_short(arg) result(r) !! Whether `arg` is a `-s` form. A bare `-` is not, and neither is a !! negative number, which must be able to reach a positional. character(len=*), intent(in) :: arg logical :: r r = .false. if (len(arg) /= 2) return if (arg(1:1) /= "-") return r = .not. (arg(2:2) >= "0" .and. arg(2:2) <= "9") end function is_short