The TELEMAC-MASCARET system  trunk
skip_comment_line.f
Go to the documentation of this file.
1 ! ****************************
2  SUBROUTINE skip_comment_line
3 ! ****************************
4 !
5  &(ific, comment, ierr)
6 !
7 !***********************************************************************
8 ! SPECIAL
9 !***********************************************************************
10 !
11 !brief READ an ascii file untile the line does not start with the
12 ! character comment given as argument
13 !
14 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 !| IFIC [in] File id
16 !| COMMENT [in] First character of a comment line
17 !| IERR [out] Error id
18 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 !
20  IMPLICIT NONE
21 !
22 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23 !
24  INTEGER, INTENT(IN) :: ific
25  CHARACTER(LEN=1), INTENT(IN) :: comment
26  INTEGER, INTENT(OUT) :: ierr
27 !
28 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
29 !
30  CHARACTER(LEN=200) :: line
31 !
32  READ(ific,*,iostat=ierr) line
33  IF(ierr.NE.0) RETURN
34 !
35  DO WHILE(line(1:1).EQ.comment(1:1))
36  READ(ific,*,iostat=ierr) line
37  IF(ierr.NE.0) RETURN
38  ENDDO
39  backspace(ific)
40  END SUBROUTINE