17 use,
intrinsic :: iso_fortran_env, only: iostat_end
34 character(len=:),
allocatable :: line
35 character(len=:),
allocatable :: last_line
36 integer(I4B) :: nbackspace = 0
37 integer(I4B) :: iostat = 0
38 integer(I4B) :: last_unit = 0
59 subroutine rdcom(this, iu, iout, line, ierr)
61 integer(I4B),
intent(in) :: iu
62 integer(I4B),
intent(in) :: iout
63 character(len=:),
intent(inout),
allocatable :: line
64 integer(I4B),
intent(inout) :: ierr
70 if (iu /= this%last_unit)
then
75 if (this%nbackspace == 1)
then
77 if (
allocated(line))
deallocate (line)
78 allocate (
character(len=len(this%last_line) + 1) :: line)
79 line(:) = this%last_line(:)
84 if (this%iostat == iostat_end)
then
88 call u9rdcom(iu, iout, line, ierr)
104 integer(I4B),
intent(in) :: iin
105 if (this%nbackspace > 0)
then
107 "Programming error in LongLineReaderType%bkspc(). Backspace &
108 & called more than once for an open file.", &
This module defines variable data types.
This module contains the LongLineReaderType.
subroutine bkspc(this, iin)
Emulate a Fortran backspace.
subroutine rdcom(this, iu, iout, line, ierr)
Return the first non-comment line.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.