Loading...
Searching...
No Matches
Functions/Subroutines
dcdatetimeputline.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine dcdatetimeputline (time, unit, indent)
 
subroutine dcdifftimeputline (diff, unit, indent)
 
subroutine dcdatetimeputline_bc (time, unit)
 
subroutine dcdifftimeputline_bc (diff, unit)
 

Function/Subroutine Documentation

◆ dcdatetimeputline()

subroutine dcdatetimeputline ( type(dc_datetime), intent(in)  time,
integer, intent(in), optional  unit,
character(*), intent(in), optional  indent 
)

Definition at line 12 of file dcdatetimeputline.f90.

13 !
14 ! 引数 *time* に設定されている情報を印字します.
15 ! デフォルトではメッセージは標準出力に出力されます.
16 ! *unit* に装置番号を指定することで, 出力先を変更することが可能です.
17 !
18 ! Print information of *time*.
19 ! By default messages are output to standard output.
20 ! Unit number for output can be changed by *unit* argument.
21 !
22 use dc_date_types, only: dc_datetime
23 use dc_date_generic, only: tochar
24 use dc_string, only: printf
25 use dc_trace, only: beginsub, endsub
26 use dc_types, only: stdout, string
28 implicit none
29 type(DC_DATETIME), intent(in) :: time
30 integer, intent(in), optional :: unit
31 ! 出力先の装置番号.
32 ! デフォルトの出力先は標準出力.
33 !
34 ! Unit number for output.
35 ! Default value is standard output.
36 character(*), intent(in), optional:: indent
37 ! 表示されるメッセージの字下げ.
38 !
39 ! Indent of displayed messages.
40
41 integer :: out_unit
42 integer:: indent_len
43 character(STRING):: indent_str
44 character(*), parameter :: subname = 'DCDateTimePutLine'
45continue
46 call beginsub(subname)
47 if (present(unit)) then
48 out_unit = unit
49 else
50 out_unit = stdout
51 end if
52
53 indent_len = 0
54 indent_str = ''
55 if ( present(indent) ) then
56 if ( len(indent) /= 0 ) then
57 indent_len = len(indent)
58 indent_str(1:indent_len) = indent
59 end if
60 end if
61
62 call printf(out_unit, &
63 & indent_str(1:indent_len) // &
64 & '#<DC_DATETIME:: @date=%c @caltype=%d @zone=%c', &
65 & i=(/time % caltype/), c1=trim(tochar(time)), c2=trim(time % zone) )
66
67 call printf(out_unit, &
68 & indent_str(1:indent_len) // &
69 & ' @day=' )
70 call dcscaledsecputline( time % day, unit = unit, &
71 & indent = indent_str(1:indent_len) // &
72 & ' ' )
73
74 call printf(out_unit, &
75 & indent_str(1:indent_len) // &
76 & ' @sec=' )
77 call dcscaledsecputline( time % sec, unit = unit, &
78 & indent = indent_str(1:indent_len) // &
79 & ' ' )
80
81 call printf(out_unit, &
82 & indent_str(1:indent_len) // '>' )
83
84999 continue
85 call endsub(subname)
subroutine, public dcscaledsecputline(sclsec, unit, indent)
種別型パラメタを提供します。
Definition dc_types.f90:49
integer, parameter, public stdout
標準出力の装置番号
Definition dc_types.f90:98
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:118

References dc_scaledsec::dcscaledsecputline(), dc_types::stdout, and dc_types::string.

Here is the call graph for this function:

◆ dcdatetimeputline_bc()

subroutine dcdatetimeputline_bc ( type(dc_datetime), intent(in)  time,
integer, intent(in), optional  unit 
)

Definition at line 175 of file dcdatetimeputline.f90.

176 use dc_date_types, only: dc_datetime
178 type(DC_DATETIME), intent(in) :: time
179 integer, intent(in), optional :: unit
180continue
181 call dcdatetimeputline( time, unit )

◆ dcdifftimeputline()

subroutine dcdifftimeputline ( type(dc_difftime), intent(in)  diff,
integer, intent(in), optional  unit,
character(*), intent(in), optional  indent 
)

Definition at line 88 of file dcdatetimeputline.f90.

89 !
90 ! 引数 *diff* に設定されている情報を印字します.
91 ! デフォルトではメッセージは標準出力に出力されます.
92 ! *unit* に装置番号を指定することで, 出力先を変更することが可能です.
93 !
94 ! Print information of *diff*.
95 ! By default messages are output to standard output.
96 ! Unit number for output can be changed by *unit* argument.
97 !
98 use dc_date_types, only: dc_difftime
99 use dc_date_generic, only: tochar
100 use dc_string, only: printf
101 use dc_trace, only: beginsub, endsub
102 use dc_types, only: stdout, string
104 implicit none
105 type(DC_DIFFTIME), intent(in) :: diff
106 integer, intent(in), optional :: unit
107 ! 出力先の装置番号.
108 ! デフォルトの出力先は標準出力.
109 !
110 ! Unit number for output.
111 ! Default value is standard output.
112 character(*), intent(in), optional:: indent
113 ! 表示されるメッセージの字下げ.
114 !
115 ! Indent of displayed messages.
116
117 integer :: out_unit
118 integer:: indent_len
119 character(STRING):: indent_str
120 character(*), parameter :: subname = 'DCDiffTimePutLine'
121continue
122 call beginsub(subname)
123 if (present(unit)) then
124 out_unit = unit
125 else
126 out_unit = stdout
127 end if
128
129 indent_len = 0
130 indent_str = ''
131 if ( present(indent) ) then
132 if ( len(indent) /= 0 ) then
133 indent_len = len(indent)
134 indent_str(1:indent_len) = indent
135 end if
136 end if
137
138 call printf(out_unit, &
139 & indent_str(1:indent_len) // &
140 & '#<DC_DIFFTIME:: @diff=%c @nondim=%b', &
141 & c1 = trim(tochar(diff)), l = (/ diff % nondim_flag /) )
142
143 call printf(out_unit, &
144 & indent_str(1:indent_len) // &
145 & ' @mon=' )
146 call dcscaledsecputline( diff % mon, unit = unit, &
147 & indent = indent_str(1:indent_len) // &
148 & ' ' )
149
150 call printf(out_unit, &
151 & indent_str(1:indent_len) // &
152 & ' @day=' )
153 call dcscaledsecputline( diff % day, unit = unit, &
154 & indent = indent_str(1:indent_len) // &
155 & ' ' )
156
157 call printf(out_unit, &
158 & indent_str(1:indent_len) // &
159 & ' @sec=' )
160 call dcscaledsecputline( diff % sec, unit = unit, &
161 & indent = indent_str(1:indent_len) // &
162 & ' ' )
163
164 call printf(out_unit, &
165 & indent_str(1:indent_len) // '>' )
166
167999 continue
168 call endsub(subname)

References dc_scaledsec::dcscaledsecputline(), dc_types::stdout, and dc_types::string.

Here is the call graph for this function:

◆ dcdifftimeputline_bc()

subroutine dcdifftimeputline_bc ( type(dc_difftime), intent(in)  diff,
integer, intent(in), optional  unit 
)

Definition at line 184 of file dcdatetimeputline.f90.

185 use dc_date_types, only: dc_difftime
187 type(DC_DIFFTIME), intent(in) :: diff
188 integer, intent(in), optional :: unit
189continue
190 call dcdifftimeputline( diff, unit )