Check CLA action consistency.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_argument), | intent(inout) | :: | self |
CLA data. |
||
character(len=*), | intent(in), | optional | :: | pref |
Prefixing string. |
subroutine check_action_consistency(self, pref) !< Check CLA action consistency. class(command_line_argument), intent(inout) :: self !< CLA data. character(*), optional, intent(in) :: pref !< Prefixing string. if (allocated(self%act)) then if (self%act==ACTION_STORE_STAR.and.(.not.allocated(self%def))) then call self%errored(pref=pref, error=ERROR_OPTIONAL_NO_DEF) return endif if (self%act==ACTION_STORE_STAR.and.self%is_positional) then call self%errored(pref=pref, error=ERROR_STORE_STAR_POSITIONAL) return endif if (self%act==ACTION_STORE_STAR.and.allocated(self%nargs)) then call self%errored(pref=pref, error=ERROR_STORE_STAR_NARGS) return endif if (self%act==ACTION_STORE_STAR.and.allocated(self%envvar)) then call self%errored(pref=pref, error=ERROR_STORE_STAR_ENVVAR) return endif if (self%act/=ACTION_STORE.and. & self%act/=ACTION_STORE_STAR.and. & self%act/=ACTION_STORE_TRUE.and. & self%act/=ACTION_STORE_FALSE.and.& self%act/=ACTION_PRINT_HELP.and. & self%act/=ACTION_PRINT_MARK.and. & self%act/=ACTION_PRINT_VERS) then call self%errored(pref=pref, error=ERROR_ACTION_UNKNOWN) return endif endif endsubroutine check_action_consistency