Check optional CLA 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_optional_consistency(self, pref) !< Check optional CLA consistency. class(command_line_argument), intent(inout) :: self !< CLA data. character(*), optional, intent(in) :: pref !< Prefixing string. logical :: is_inconsistent is_inconsistent = ((.not.allocated(self%def)).and.(.not.self%is_required)) is_inconsistent = ((.not.allocated(self%def)).and.(.not.self%is_val_required)).or.is_inconsistent if (allocated(self%nargs)) is_inconsistent = ((.not.allocated(self%def)).and.(self%nargs=='*')).or.is_inconsistent if (is_inconsistent) call self%errored(pref=pref, error=ERROR_OPTIONAL_NO_DEF) endsubroutine check_optional_consistency