Statistics
| Revision:

root / src / NoComment.f90 @ 10

History | View | Annotate | Download (397 Bytes)

1 10 pfleura2
      SUBROUTINE noComment(String)
2 10 pfleura2
3 10 pfleura2
! This subroutine suppress all comments from a string
4 10 pfleura2
! comments can start with ! or #
5 10 pfleura2
6 10 pfleura2
        IMPLICIT NONE
7 10 pfleura2
8 10 pfleura2
        integer, parameter :: KINT = kind(1)
9 10 pfleura2
10 10 pfleura2
        CHARACTER(*), INTENT(INOUT) :: String
11 10 pfleura2
        INTEGER(KINT) :: i
12 10 pfleura2
13 10 pfleura2
        I=Scan(String,"!#")
14 10 pfleura2
        IF (I/=0) THEN
15 10 pfleura2
           String=String(:I-1)
16 10 pfleura2
        END IF
17 10 pfleura2
18 10 pfleura2
      END SUBROUTINE NoComment