scan_contain Subroutine

public subroutine scan_contain(iunps, stop_string, rew)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iunps
character(len=*), intent(in) :: stop_string
logical, intent(in) :: rew

Calls

proc~~scan_contain~~CallsGraph proc~scan_contain scan_contain proc~matches matches proc~scan_contain->proc~matches

Source Code

  subroutine scan_contain (iunps, stop_string, rew)
    !---------------------------------------------------------------------
    !
    implicit none
    integer, intent(in) :: iunps
    character (len=*), intent(in) :: stop_string
    logical, intent(in) :: rew            ! if rewind
    character (len=100) :: line
!!    logical :: matches          ! function name
    integer :: ios
    !
    ios = 0
    if (rew) rewind (iunps)
    do while (ios==0)
       read (iunps, '(a100)', iostat = ios) line
       if (matches (trim(line), trim(stop_string)) ) return
    enddo
    return
  end subroutine scan_contain