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

Public Member Functions

subroutine dcclockputline0 (clk, unit, indent, err)

Detailed Description

Definition at line 139 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockputline0()

subroutine dc_clock::dcclockputline::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 608 of file dc_clock.f90.

609 use dc_types, only: stdout
610 use dc_message, only: messagenotify
611 use dc_string, only: printf, tochar, cprintf
612 use dc_date, only: evalsec, evalday, tochar
614 use dc_types, only: dp
615 implicit none
616 type(CLOCK), intent(in):: clk
617 integer, intent(in), optional:: unit
618 character(*), intent(in), optional:: indent
619 logical, intent(out), optional:: err
620 integer:: out_unit
621 character(STRING):: cause_c
622 integer:: stat
623 integer:: indent_len
624 character(STRING):: indent_str
625 character(*), parameter:: subname = 'DCClockPutLine'
626 continue
627 call beginsub(subname)
628 stat = dc_noerr
629 cause_c = 'CLOCK'
630 if (.not. clk % initialized) then
631 call messagenotify('W', subname, 'Call Create before PutLine in dc_clock.')
632 call dbgmessage('Ignored because input argument was not initialized.')
633 stat = dc_enotinit
634 goto 999
635 end if
636 if (present(unit)) then
637 out_unit = unit
638 else
639 out_unit = stdout
640 end if
641 indent_len = 0
642 indent_str = ''
643 if (present(indent)) then
644 if (len(indent) /= 0) then
645 indent_len = len(indent)
646 indent_str(1:indent_len) = indent
647 end if
648 end if
649 call printf(out_unit, &
650 & indent_str(1:indent_len) // &
651 & '#<CLOCK:: @name=%c @clocking=%y @elapsed_time=%f sec. %c @start_date=%c>', &
652 & c1=trim(clk % name), l=(/clk % start_time > 0.0_dp/), &
653 & d=(/clk % elapsed_time/), &
654 & c2=trim(fit_unit_value(clk % elapsed_time)), &
655 & c3=trim(tochar(clk % start_date)))
656 call dbgmessage('name=%c, output to device number %d', &
657 & c1=trim(clk % name), i=(/out_unit/))
658999 continue
659 call storeerror(stat, subname, err, cause_c)
660 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

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_types::dp, dc_trace::endsub(), dc_types::stdout, and dc_error::storeerror().

Here is the call graph for this function:

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