gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
dc_clock::putline Interface Reference

Public Member Functions

subroutine dcclockputline0 (clk, unit, indent, err)

Detailed Description

Definition at line 178 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockputline0()

subroutine dc_clock::putline::dcclockputline0 ( type(clock), intent(in) clk,
integer, intent(in), optional unit,
character(*), intent(in), optional indent,
logical, intent(out), optional err )

構造型 CLOCK 変数の情報を表示

構造型 CLOCK 変数に関する情報を表示します。unit には出力先の装置番号を 与えてください。unit を与えない場合、標準出力へ表示されます。

clk に対して DCClockCreate による初期化が行われていない場合、 エラーを発生させます。err を与える場合には err に .true. が返り、 プログラムは続行されます。

Parameters
[in]clkCLOCK 型変数
[in]unit出力先装置番号 (省略可)。デフォルト: 標準出力。
[in]indent表示されるメッセージの字下げ (省略可)
[out]errエラーフラグ (省略可)。エラー時に .true.。

Definition at line 604 of file dc_clock.f90.

605 use dc_types, only: stdout
606 use dc_message, only: messagenotify
607 use dc_string, only: printf, tochar, cprintf
608 use dc_date, only: evalsec, evalday, tochar
610 use dc_types, only: dp
611 implicit none
612 type(CLOCK), intent(in):: clk
613 integer, intent(in), optional:: unit
614 character(*), intent(in), optional:: indent
615 logical, intent(out), optional:: err
616 integer:: out_unit
617 character(STRING):: cause_c
618 integer:: stat
619 integer:: indent_len
620 character(STRING):: indent_str
621 character(*), parameter:: subname = 'DCClockPutLine'
622 continue
623 call beginsub(subname)
624 stat = dc_noerr
625 cause_c = 'CLOCK'
626 if (.not. clk % initialized) then
627 call messagenotify('W', subname, 'Call Create before PutLine in dc_clock.')
628 call dbgmessage('Ignored because input argument was not initialized.')
629 stat = dc_enotinit
630 goto 999
631 end if
632 if (present(unit)) then
633 out_unit = unit
634 else
635 out_unit = stdout
636 end if
637 indent_len = 0
638 indent_str = ''
639 if (present(indent)) then
640 if (len(indent) /= 0) then
641 indent_len = len(indent)
642 indent_str(1:indent_len) = indent
643 end if
644 end if
645 call printf(out_unit, &
646 & indent_str(1:indent_len) // &
647 & '#<CLOCK:: @name=%c @clocking=%y @elapsed_time=%f sec. %c @start_date=%c>', &
648 & c1=trim(clk % name), l=(/clk % start_time > 0.0_dp/), &
649 & d=(/clk % elapsed_time/), &
650 & c2=trim(fit_unit_value(clk % elapsed_time)), &
651 & c3=trim(tochar(clk % start_date)))
652 call dbgmessage('name=%c, output to device number %d', &
653 & c1=trim(clk % name), i=(/out_unit/))
654999 continue
655 call storeerror(stat, subname, err, cause_c)
656 call endsub(subname)
日付および時刻に関する手続きを提供するモジュール
Definition dc_date.f90:57
エラー処理用モジュール
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_enotinit
-400 以下: dc ユーティリティのエラー
Definition dc_error.f90:534
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
メッセージの出力
文字型変数の操作
Definition dc_string.f90:83
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public stdout
標準出力の装置番号
Definition dc_types.f90:117
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92

The documentation for this interface was generated from the following file: