added subroutine 'IO_skipChunks' that is needed by mesh.f90

This commit is contained in:
Christoph Kords 2009-04-03 07:04:31 +00:00
parent 0e84b07dc7
commit b57a128a88
1 changed files with 24 additions and 0 deletions

View File

@ -596,6 +596,30 @@ END FUNCTION
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"
! as last char or range of values a "to" b