scan_begin Subroutine

public subroutine scan_begin(iunps, substring, rew)

Arguments

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

Calls

proc~~scan_begin~~CallsGraph proc~scan_begin scan_begin proc~matchbgn matchbgn proc~scan_begin->proc~matchbgn

Source Code

  subroutine scan_begin (iunps, substring, rew)
    implicit none
    ! unit of input
    integer, intent(in) :: iunps
    ! Label to be matched
    character (len=*), intent(in) :: substring
    logical, intent(in) :: rew
    ! String read from file
    character (len=100) :: line
    ! Flag if .true. rewind the file
    !logical, external :: matchbgn
!    logical :: matchbgn
    integer :: ios
    !
    ios = 0
    if (rew) rewind (iunps)
    do while (ios==0)
       read (iunps, '(a100)', iostat = ios) line
       if (matchbgn (trim(line), trim(substring)) ) return
    enddo
    return
  end subroutine scan_begin