open_file Function

private function open_file(filename) result(f)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename

Return Value type(file_t)


Called by

proc~~open_file~~CalledByGraph proc~open_file open_file interface~file_t file_t interface~file_t->proc~open_file

Source Code

  function open_file(filename) result(f)
    character(len=*),intent(in) :: filename
    type(file_t) :: f
    integer :: istat
    print*, 'open'
    open(newunit=f%iunit, file=filename, status='OLD', iostat=istat)
    !print*, 'iunit = ', f%iunit
    if (istat/=0) error stop istat
  end function open_file