Fomats a line by removing comments and replacing tabs with spaces.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=MAX_LINE_SIZE), | intent(inout) | :: | line |
A line from the input file |
pure subroutine parser_obj_ReformatLine(line) !> Fomats a line by removing comments and replacing ! tabs with spaces. implicit none character(MAX_LINE_SIZE),intent(inout):: line !! A line from the input file ! Work variables integer :: comment_index !! Left most position of a comment symbol integer :: n ! Remove the tabs do n=1,MAX_LINE_SIZE if (ichar(line(n:n)).EQ.TAB_ICHAR) line(n:n)=' ' end do ! Remove comments comment_index = scan(line,COMMENT_SYMBOLS) if (comment_index.ne.0) line(comment_index:) = '' ! Trim line = adjustl(line) return end subroutine parser_obj_ReformatLine