This subroutine runs the is_valid__pattern
function and prints the result.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pattern | |||
logical, | intent(in) | :: | answer | |||
logical, | intent(inout) | :: | result |
subroutine runner_validate(pattern, answer, result) implicit none character(*), intent(in) :: pattern logical, intent(in) :: answer logical, intent(inout) :: result logical :: res res = is_valid__pattern(pattern, answer) if (res) then write(error_unit, '(a,a,l1)') 'result(validate): Success', ' '//trim(pattern)//' ', answer else write(error_unit, '(a,a,l1)') 'result(validate): FAILED ', ' '//trim(pattern)//' ', answer end if result = result .and. res end subroutine runner_validate