get_number_of_line Function

private function get_number_of_line(till, infile) result(number)

Get number of lines till some character like "#"

Arguments

Type IntentOptional AttributesName
character(len=1), intent(in) :: till
integer, intent(in) :: infile

Return Value integer


Called by

proc~~get_number_of_line~~CalledByGraph proc~get_number_of_line get_number_of_line proc~read_res_list read_Res_list proc~read_res_list->proc~get_number_of_line proc~get_count_within_braces get_count_within_braces proc~read_res_list->proc~get_count_within_braces proc~get_count_within_braces->proc~get_number_of_line proc~read_input_and_controls read_input_and_controls proc~read_input_and_controls->proc~read_res_list proc~setup_solver setup_solver proc~setup_solver->proc~read_input_and_controls proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

      function get_number_of_line(till, infile) result(number)
        !< Get number of lines till some character like "#"
        implicit none
        integer          ,intent(in) :: infile
        character(len= 1),intent(in) :: till
        character(len=64)   :: buf
        integer             :: ios
        integer             :: number
        number=0
        do while(.true.)
          read(infile, *, iostat=ios) buf
          if(trim(buf)==till) EXIT
          if(is_iostat_end(ios)) EXIT
          number = number + 1
        end do
      end function get_number_of_line