append_ext Subroutine

public subroutine append_ext(stem, n, s)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: stem
integer, intent(in) :: n
character(len=*), intent(out) :: s

Contents

Source Code


Source Code

    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