dc_clock::putline Interface Reference

Private Member Functions

subroutine dcclockputline0 (clk, unit, indent, err)
 

Detailed Description

Definition at line 189 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 
)
private

Definition at line 468 of file dc_clock.f90.

468  !
469  !=== 構造型 CLOCK 変数の情報を表示
470  !
471  ! 構造型 CLOCK 変数に関する情報を表示します. *unit* には出力先の装置番号を
472  ! 与えてください. *unit* を与えない場合, 標準出力へ表示されます.
473  !
474  ! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,
475  ! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,
476  ! プログラムは続行されます.
477  !
478  use dc_types, only: stdout
479  use dc_message, only: messagenotify
480  use dc_string, only: printf, tochar, cprintf
481  use dc_date, only: evalsec, evalday, tochar
483  use dc_types, only: dp
484  implicit none
485  type(clock), intent(in):: clk
486  integer, intent(in), optional:: unit
487  character(*), intent(in), optional:: indent
488  ! 表示されるメッセージの字下げ.
489  !
490  ! Indent of displayed messages.
491  logical, intent(out), optional:: err
492  integer:: out_unit
493  character(STRING):: cause_c
494  integer:: stat
495  integer:: indent_len
496  character(STRING):: indent_str
497  character(*), parameter:: subname = 'DCClockPutLine'
498  continue
499  call beginsub(subname)
500  stat = dc_noerr
501  cause_c = 'CLOCK'
502  if (.not. clk % initialized) then
503  call messagenotify('W', subname, 'Call Create before PutLine in dc_clock.')
504  call dbgmessage('Ignored because input argument was not initialized.')
505  stat = dc_enotinit
506  goto 999
507  end if
508  if (present(unit)) then
509  out_unit = unit
510  else
511  out_unit = stdout
512  end if
513  indent_len = 0
514  indent_str = ''
515  if (present(indent)) then
516  if (len(indent) /= 0) then
517  indent_len = len(indent)
518  indent_str(1:indent_len) = indent
519  end if
520  end if
521  call printf(out_unit, &
522  & indent_str(1:indent_len) // &
523  & '#<CLOCK:: @name=%c @clocking=%y @elapsed_time=%f sec. %c @start_date=%c>', &
524  & c1=trim(clk % name), l=(/clk % start_time > 0.0_dp/), &
525  & d=(/clk % elapsed_time/), &
526  & c2=trim(fit_unit_value(clk % elapsed_time)), &
527  & c3=trim(tochar(clk % start_date)))
528  call dbgmessage('name=%c, output to device number %d', &
529  & c1=trim(clk % name), i=(/out_unit/))
530 999 continue
531  call storeerror(stat, subname, err, cause_c)
532  call endsub(subname)
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
integer, parameter, public stdout
標準出力の装置番号
Definition: dc_types.f90:98
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49

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