runner_suffix Subroutine

public subroutine runner_suffix(pattern, suffix, result)

This function runs the is_valid_suffix function and prints the result.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: pattern
character(len=*), intent(in) :: suffix
logical, intent(inout) :: result

Source Code

   subroutine runner_suffix(pattern, suffix, result)
      implicit none
      character(*), intent(in) :: pattern, suffix
      logical, intent(inout) :: result
      logical :: res

      res = is_valid__suffix(pattern, suffix)

      if (res) then
         write(error_unit, '(a,a,a)') 'result(suffix): Success', ' '//trim(pattern), ' "'//trim(suffix)//'"'
      else
         write(error_unit, '(a,a,a)') 'result(suffix): FAILED ', ' '//trim(pattern), ' "'//trim(suffix)//'"'
      end if
      result = result .and. res
   end subroutine runner_suffix