! C の fprintf(3) とは大分違うので注意。
!

subroutine DCStringFPrintf(unit, fmt, i, r, d, L, s, n, c1, c2, c3)
    use dcstring_base, only: VSTRING
    use dc_types, only: STRING
    use dc_string, only: DCStringSPrintf
    implicit none
    integer, intent(in), optional:: unit
    character(*), intent(in):: fmt
    integer, intent(in), optional:: i(:), n(:)
    real, intent(in), optional:: r(:)
    double precision, intent(in), optional:: d(:)
    logical, intent(in), optional:: L(:)
    type(VSTRING), intent(in), optional:: s(:)
    character(*), intent(in), optional:: c1, c2, c3
    character(STRING):: buf
continue
    call dcstringsprintf(buf, fmt, i=i, r=r, d=d, L=L, s=s, n=n, &
        & c1=c1, c2=c2, c3=c3)
    if (present(unit)) then
        write(unit, '(A)') trim(buf)
    else
        write(*, '(A)') trim(buf)
    endif
end subroutine
