Check if required CLA is passed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_argument), | intent(inout) | :: | self |
CLA data. |
||
character(len=*), | intent(in), | optional | :: | pref |
Prefixing string. |
Check result.
function is_required_passed(self, pref) result(is_ok) !< Check if required CLA is passed. class(command_line_argument), intent(inout) :: self !< CLA data. character(*), optional, intent(in) :: pref !< Prefixing string. logical :: is_ok !< Check result. is_ok = .true. if (((.not.self%is_passed).and.self%is_required).or.((.not.self%is_passed).and.(.not.allocated(self%def)))) then call self%errored(pref=pref, error=ERROR_MISSING_REQUIRED) is_ok = .false. endif endfunction is_required_passed