Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | stem | |||
integer, | intent(in) | :: | n | |||
character(len=*), | intent(out) | :: | s |
subroutine append_ext(stem, n, s)
! Returns stem.n in s.
character(*), intent(in) :: stem
integer, intent(in) :: n
character(*), intent(out) :: s
character(10) :: ext
write(ext, '('//int_fmt(n, 0)//')') n
s = stem//'.'//ext
end subroutine append_ext