Changeset 4863 for IOIPSL/trunk/src/stringop.f90
- Timestamp:
- 12/16/19 14:33:26 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
IOIPSL/trunk/src/stringop.f90
r936 r4863 6 6 ! See IOIPSL/IOIPSL_License_CeCILL.txt 7 7 !--------------------------------------------------------------------- 8 CHARACTER(LEN=1), PARAMETER :: COMMENT_TAG = "#" ! Comment symbol 9 8 10 CONTAINS 9 11 != … … 120 122 END SUBROUTINE nocomma 121 123 !=== 124 SUBROUTINE nocomment (str) 125 !--------------------------------------------------------------------- 126 !- Delete comment part from a line 127 ! 128 !- line: TIME_SKIP=1D # skip one day 129 ! to 130 ! line: TIME_SKIP=1D 131 !--------------------------------------------------------------------- 132 IMPLICIT NONE 133 !- 134 CHARACTER(LEN=*), INTENT(INOUT) :: str 135 !- 136 INTEGER :: pos 137 !--------------------------------------------------------------------- 138 pos = INDEX(str, COMMENT_TAG) 139 IF (pos > 0) THEN 140 IF (pos == 1) THEN 141 str="" 142 ELSE 143 str=TRIM(str(1:pos-1)) 144 ENDIF 145 ENDIF 146 !--------------------- 147 END SUBROUTINE nocomment 148 !=== 122 149 SUBROUTINE strlowercase (str) 123 150 !---------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.