dc_scaledsec::putline Interface Reference

Private Member Functions

subroutine dcscaledsecputline (sclsec, unit, indent)
 

Detailed Description

Definition at line 82 of file dc_scaledsec.f90.

Member Function/Subroutine Documentation

◆ dcscaledsecputline()

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

Definition at line 343 of file dc_scaledsec.f90.

343  !
344  ! 引数 *sclsec* に設定されている情報を印字します.
345  ! デフォルトではメッセージは標準出力に出力されます.
346  ! *unit* に装置番号を指定することで, 出力先を変更することが可能です.
347  !
348  ! Print information of *sclsec*.
349  ! By default messages are output to standard output.
350  ! Unit number for output can be changed by *unit* argument.
351  !
352  use dc_string, only: printf, tochar
353  use dc_trace, only: beginsub, endsub
354  use dc_types, only: stdout, string
355  implicit none
356  type(dc_scaled_sec), intent(in) :: sclsec
357  integer, intent(in), optional :: unit
358  ! 出力先の装置番号.
359  ! デフォルトの出力先は標準出力.
360  !
361  ! Unit number for output.
362  ! Default value is standard output.
363  character(*), intent(in), optional:: indent
364  ! 表示されるメッセージの字下げ.
365  !
366  ! Indent of displayed messages.
367 
368  integer :: out_unit, sec_ary_rev(imin:imax)
369  integer:: indent_len
370  character(STRING):: indent_str
371  character(1):: sign
372  character(*), parameter:: subname = 'DCScaledSecPutLine'
373  continue
374  !call BeginSub(subname)
375 
376  if (present(unit)) then
377  out_unit = unit
378  else
379  out_unit = stdout
380  end if
381 
382  indent_len = 0
383  indent_str = ''
384  if ( present(indent) ) then
385  if ( len(indent) /= 0 ) then
386  indent_len = len(indent)
387  indent_str(1:indent_len) = indent
388  end if
389  end if
390 
391  sec_ary_rev(imin:imax) = sclsec % sec_ary(imax:imin:-1)
392  if ( sclsec % flag_negative ) then
393  sign = '-'
394  else
395  sign = '+'
396  end if
397  if ( imax - imin + 1 == 6 ) then
398  call printf(out_unit, &
399  & indent_str(1:indent_len) // &
400  & '#<DC_SCALED_SEC:: @sign=%c @yotta=%d @exa=%d @tera=%d @mega=%d @base=%d @micro=%d>', &
401  & i = sec_ary_rev, c1 = sign )
402  elseif ( imax - imin + 1 == 11 ) then
403  call printf(out_unit, &
404  & indent_str(1:indent_len) // &
405  & '#<DC_SCALED_SEC:: @sign=%c @yotta=%d @zetta=%d @exa=%d @peta=%d @tera=%d', &
406  & i = sec_ary_rev(imin:imin+4), c1 = sign )
407  call printf(out_unit, &
408  & indent_str(1:indent_len) // &
409  & ' @giga=%d @mega=%d @kilo=%d @base=%d @milli=%d @micro=%d>', &
410  & i = sec_ary_rev(imax-5:imax) )
411  else
412  call printf(out_unit, &
413  & indent_str(1:indent_len) // &
414  & '#<DC_SCALED_SEC:: @sign=%c @sec_ary=%*d>', &
415  & i = sec_ary_rev, n = (/ imax - imin + 1 /), c1 = sign )
416  end if
417  999 continue
418  !call EndSub(subname)
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
integer, parameter, public stdout
標準出力の装置番号
Definition: dc_types.f90:98
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118

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