Check if required value of 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_val_passed(self, pref) result(is_ok) !< Check if required value of 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 (self%is_val_required.and.((.not.self%is_passed).or.(.not.allocated(self%val)))) then call self%errored(pref=pref, error=ERROR_MISSING_REQUIRED_VAL) is_ok = .false. endif endfunction is_required_val_passed