行末の CR 文字 (char 13) をスペースに置換し、CRLF 改行の OBJ に対応する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | line |
処理対象の行文字列。 |
subroutine strip_cr(line) character(len=*), intent(inout) :: line integer :: i do i = len_trim(line), 1, -1 if (ichar(line(i:i)) == 13) then line(i:i) = ' ' else exit end if end do end subroutine strip_cr