functionis_markerpureprivate
pure logical function is_marker(line, c)
True if line is three of c, alone or followed by whitespace and anything else.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| line | character(len=*) | in | the line | |
| c | character(len=1) | in | the marker character |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| is_marker | logical |
Source
Show the code
pure logical function is_marker(line, c)
character(len=*), intent(in) :: line !! the line
character, intent(in) :: c !! the marker character
is_marker = len(line) >= 3
if (.not. is_marker) return
is_marker = line(1:3) == c//c//c
if (is_marker .and. len(line) > 3) is_marker = line(4:4) == ' ' .or. line(4:4) == achar(9)
end function is_marker