scan_write_begin_with_line1_flush_Left Subroutine

public subroutine scan_write_begin_with_line1_flush_Left(ur, uw, L1)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ur
integer, intent(in) :: uw
character(len=*), intent(in) :: L1

Source Code

  subroutine scan_write_begin_with_line1_flush_Left (ur, uw, L1)
    character (len=*), intent(in) :: L1
    integer, intent(in) :: ur, uw

    integer :: i  
    character (len=300) :: line

    rewind(ur)
    ios=0
    do while (ios==0)
       read (ur, '(a300)', iostat = ios, err = 300) line
       i=index( adjustl(line), trim(L1) )
       if ( i==1 ) then
          write(uw, '(a)')  trim(line)
       end if
    end do
300 continue
    write(uw,*)

  end subroutine scan_write_begin_with_line1_flush_Left