dcstringfprintf.f90

Path: src/dcstringfprintf.f90
Last Update: Wed Aug 31 16:09:06 JST 2005

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

Methods

Included Modules

dcstring_base dc_types dc_string

Public Instance methods

unit :integer, intent(in), optional
fmt :character(*), intent(in)
i(:) :integer, intent(in), optional
r(:) :real, intent(in), optional
d(:) :double precision, intent(in), optional
L(:) :logical, intent(in), optional
s(:) :type(VSTRING), intent(in), optional
n(:) :integer, intent(in), optional
c1 :character(*), intent(in), optional
c2 :character(*), intent(in), optional
c3 :character(*), intent(in), optional
ca(:) :character(*), intent(in), optional

[Source]

subroutine DCStringFPrintf(unit, fmt, i, r, d, L, s, n, c1, c2, c3, ca)

    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(*), intent(in), optional:: ca(:)
    character(STRING):: buf
continue
    call printf(buf, fmt, i=i, r=r, d=d, L=L, s=s, n=n,  c1=c1, c2=c2, c3=c3, ca=ca)
    if (present(unit)) then
        write(unit, '(A)') trim(buf)
    else
        write(*, '(A)') trim(buf)
    endif
end subroutine

[Validate]