gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
dc_scaledsec Module Reference

精密な時間演算のための秒スケールモジュール More...

Data Types

interface  abs
 
interface  assignment(=)
 
interface  ceiling
 
type  dc_scaled_sec
 
interface  floor
 
interface  int
 
interface  mod
 
interface  modulo
 
interface  operator(*)
 
interface  operator(+)
 
interface  operator(-)
 
interface  operator(/)
 
interface  operator(<)
 
interface  operator(<=)
 
interface  operator(==)
 
interface  operator(>)
 
interface  operator(>=)
 
interface  sign
 

Functions/Subroutines

subroutine, public dcscaledsecputline (sclsec, unit, indent)
 

Detailed Description

精密な時間演算のための秒スケールモジュール

Author
Youhei SASAKI, Yasuhiro MORIKAWA

Function/Subroutine Documentation

◆ dcscaledsecputline()

subroutine, public dc_scaledsec::dcscaledsecputline ( type(dc_scaled_sec), intent(in)  sclsec,
integer, intent(in), optional  unit,
character(*), intent(in), optional  indent 
)

DC_SCALED_SEC の情報を印字

引数 sclsec に設定されている情報を印字します. デフォルトではメッセージは標準出力に出力されます. unit に装置番号を指定することで, 出力先を変更することが可能です.

Parameters
[in]sclsec印字する DC_SCALED_SEC 型変数
[in]unit出力先の装置番号. デフォルトは標準出力.
[in]indent表示されるメッセージの字下げ

Definition at line 428 of file dc_scaledsec.f90.

429 use dc_string, only: printf, tochar
430 use dc_trace, only: beginsub, endsub
431 use dc_types, only: stdout, string
432 implicit none
433 type(DC_SCALED_SEC), intent(in) :: sclsec
434 integer, intent(in), optional :: unit
435 character(*), intent(in), optional:: indent
436
437 integer :: out_unit, sec_ary_rev(imin:imax)
438 integer:: indent_len
439 character(STRING):: indent_str
440 character(1):: sign
441 continue
442 !call BeginSub(subname)
443
444 if (present(unit)) then
445 out_unit = unit
446 else
447 out_unit = stdout
448 end if
449
450 indent_len = 0
451 indent_str = ''
452 if ( present(indent) ) then
453 if ( len(indent) /= 0 ) then
454 indent_len = len(indent)
455 indent_str(1:indent_len) = indent
456 end if
457 end if
458
459 sec_ary_rev(imin:imax) = sclsec % sec_ary(imax:imin:-1)
460 if ( sclsec % flag_negative ) then
461 sign = '-'
462 else
463 sign = '+'
464 end if
465 if ( imax - imin + 1 == 6 ) then
466 call printf(out_unit, &
467 & indent_str(1:indent_len) // &
468 & '#<DC_SCALED_SEC:: @sign=%c @yotta=%d @exa=%d @tera=%d @mega=%d @base=%d @micro=%d>', &
469 & i = sec_ary_rev, c1 = sign )
470 elseif ( imax - imin + 1 == 11 ) then
471 call printf(out_unit, &
472 & indent_str(1:indent_len) // &
473 & '#<DC_SCALED_SEC:: @sign=%c @yotta=%d @zetta=%d @exa=%d @peta=%d @tera=%d', &
474 & i = sec_ary_rev(imin:imin+4), c1 = sign )
475 call printf(out_unit, &
476 & indent_str(1:indent_len) // &
477 & ' @giga=%d @mega=%d @kilo=%d @base=%d @milli=%d @micro=%d>', &
478 & i = sec_ary_rev(imax-5:imax) )
479 else
480 call printf(out_unit, &
481 & indent_str(1:indent_len) // &
482 & '#<DC_SCALED_SEC:: @sign=%c @sec_ary=%*d>', &
483 & i = sec_ary_rev, n = (/ imax - imin + 1 /), c1 = sign )
484 end if
485 !call EndSub(subname)
文字型変数の操作
Definition dc_string.f90:83
デバッグ時の追跡用モジュール
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public stdout
標準出力の装置番号
Definition dc_types.f90:117
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137

References dc_trace::beginsub(), dc_trace::endsub(), dc_types::stdout, and dc_types::string.

Here is the call graph for this function: