Column for the code of a continuation line: the first item after the innermost open
bracket; outside brackets, the first item after an assignment, a use statement's only:
or a declaration's ::; otherwise a fixed indent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(writer_t), | intent(in) | :: | w |
the output and the alignment state |
||
| integer, | intent(in) | :: | ind |
indentation of the statement, in blanks |
||
| type(format_options_t), | intent(in) | :: | opts |
the formatting options |
pure integer function continuation_target(w, ind, opts) result(target) !! Column for the code of a continuation line: the first item after the innermost open !! bracket; outside brackets, the first item after an assignment, a `use` statement's `only:` !! or a declaration's `::`; otherwise a fixed indent. type(writer_t), intent(in) :: w !! the output and the alignment state integer, intent(in) :: ind !! indentation of the statement, in blanks type(format_options_t), intent(in) :: opts !! the formatting options integer :: a target = ind + opts%continuation_indent if (opts%continuation /= CONT_ALIGN) return if (w%nbrackets > 0) then if (w%bracket_first(w%nbrackets) >= 0) target = w%bracket_first(w%nbrackets) return end if do a = 1, size(w%anchor_col) if (w%anchor_col(a) >= 0) then target = w%anchor_col(a) return end if end do end function continuation_target