added subroutine 'IO_skipChunks' that is needed by mesh.f90
This commit is contained in:
parent
0e84b07dc7
commit
b57a128a88
24
trunk/IO.f90
24
trunk/IO.f90
|
@ -596,6 +596,30 @@ END FUNCTION
|
||||||
END SUBROUTINE
|
END SUBROUTINE
|
||||||
|
|
||||||
|
|
||||||
|
!********************************************************************
|
||||||
|
! read on in file to skip (at least) N chunks (may be over multiple lines)
|
||||||
|
!********************************************************************
|
||||||
|
SUBROUTINE IO_skipChunks (unit,N)
|
||||||
|
|
||||||
|
use prec, only: pReal,pInt
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
integer(pInt) remainingChunks,unit,N
|
||||||
|
integer(pInt), parameter :: maxNchunks = 64
|
||||||
|
integer(pInt), dimension(1+2*maxNchunks) :: pos
|
||||||
|
character(len=300) line
|
||||||
|
|
||||||
|
remainingChunks = N
|
||||||
|
do while (remainingChunks > 0)
|
||||||
|
read(unit,'(A300)',end=100) line
|
||||||
|
pos = IO_stringPos(line,maxNchunks)
|
||||||
|
remainingChunks = remainingChunks - pos(1)
|
||||||
|
end do
|
||||||
|
100 return
|
||||||
|
|
||||||
|
END SUBROUTINE
|
||||||
|
|
||||||
|
|
||||||
!********************************************************************
|
!********************************************************************
|
||||||
! count items in consecutive lines of ints concatenated by "c"
|
! count items in consecutive lines of ints concatenated by "c"
|
||||||
! as last char or range of values a "to" b
|
! as last char or range of values a "to" b
|
||||||
|
|
Loading…
Reference in New Issue