\hypertarget{dccalconverttosec_8f90}{}\section{dc\+\_\+utils/dccalconverttosec.f90 File Reference}
\label{dccalconverttosec_8f90}\index{dc\+\_\+utils/dccalconverttosec.\+f90@{dc\+\_\+utils/dccalconverttosec.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
real(dp) function \hyperlink{dccalconverttosec_8f90_a0009fdd8e25face93e79f28d9999f493}{dccalconverttosec1} (in\+\_\+time, in\+\_\+unit, cal)
\item 
real(dp) function \hyperlink{dccalconverttosec_8f90_a62740b64f348214330eaa10edcdc6c90}{dccalconverttosec2} (in\+\_\+time, in\+\_\+unit, cal)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dccalconverttosec_8f90_a0009fdd8e25face93e79f28d9999f493}\label{dccalconverttosec_8f90_a0009fdd8e25face93e79f28d9999f493}} 
\index{dccalconverttosec.\+f90@{dccalconverttosec.\+f90}!dccalconverttosec1@{dccalconverttosec1}}
\index{dccalconverttosec1@{dccalconverttosec1}!dccalconverttosec.\+f90@{dccalconverttosec.\+f90}}
\subsubsection{\texorpdfstring{dccalconverttosec1()}{dccalconverttosec1()}}
{\footnotesize\ttfamily real(dp) function dccalconverttosec1 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{in\+\_\+time,  }\item[{character($\ast$), intent(in)}]{in\+\_\+unit,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal }\end{DoxyParamCaption})}



Definition at line 2 of file dccalconverttosec.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ebadunit, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+str2usym(), dc\+\_\+calendar\+\_\+internal\+::dccaltype\+\_\+str(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+min, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+month, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+sec, and dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+year.


\begin{DoxyCode}
2   \textcolor{comment}{!}
3   \textcolor{comment}{! 任意の時間単位 (日時分秒) から秒への単位の変換を行います. }
4   \textcolor{comment}{! }
5   \textcolor{comment}{! 時間の単位として有効な文字列については以下を参照下さい.}
6   \textcolor{comment}{!}
7   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SEC          :: 秒の単位}
8   \textcolor{comment}{! dc\_calendar\_types#UNIT\_MIN          :: 分の単位}
9   \textcolor{comment}{! dc\_calendar\_types#UNIT\_HOUR         :: 時間の単位}
10   \textcolor{comment}{! dc\_calendar\_types#UNIT\_DAY          :: 日の単位}
11   \textcolor{comment}{! }
12   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, dc\_calendar 内部で}
13   \textcolor{comment}{! 保持される暦に関する情報を用いた単位の変換が行われます. }
14   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦の情報を}
15   \textcolor{comment}{! 用いて単位の変換が行われます. }
16   \textcolor{comment}{!}
17   \textcolor{comment}{! Convert of unit from arbitrary time units (day, hour, minute, second) }
18   \textcolor{comment}{! into sec. }
19   \textcolor{comment}{!}
20   \textcolor{comment}{! Valid strings as units of time are follows. }
21   \textcolor{comment}{! }
22   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SEC          :: Units of second}
23   \textcolor{comment}{! dc\_calendar\_types#UNIT\_MIN          :: Units of minute}
24   \textcolor{comment}{! dc\_calendar\_types#UNIT\_HOUR         :: Units of hour}
25   \textcolor{comment}{! dc\_calendar\_types#UNIT\_DAY          :: Units of day}
26   \textcolor{comment}{!}
27   \textcolor{comment}{! If an optional argument *cal* is omitted, }
28   \textcolor{comment}{! unit is converted with information of a calendar }
29   \textcolor{comment}{! that is stored in the "dc\_calendar". }
30   \textcolor{comment}{! If *cal* is not omitted, unit is converted with information of the variable.}
31   \textcolor{comment}{!}
32   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, &
33     & \hyperlink{namespacedc__calendar__internal_aa5cfbed96ce640b2c6dd7bc0df513872}{dccaltype\_str}, \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}
34   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, &
35     & \hyperlink{namespacedc__calendar__types_a9f02aaa42bc65301b0f6e86c34f5e975}{unit\_symbol\_year}, \hyperlink{namespacedc__calendar__types_a6a2218105981b62304a32c51f20e0824}{unit\_symbol\_month}, 
      \hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day}, &
36     & \hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour}, \hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min}, 
      \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
37   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
38   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
39   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
40   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
41   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
42   \textcolor{keywordtype}{implicit none}
43   \textcolor{keywordtype}{real(DP)}:: out\_time
44                               \textcolor{comment}{! 変換後の時間の数値. }
45                               \textcolor{comment}{! }
46                               \textcolor{comment}{! Numerical value of time after conversion. }
47 
48   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: in\_time
49                               \textcolor{comment}{! 変換前の時間の数値. }
50                               \textcolor{comment}{! }
51                               \textcolor{comment}{! Numerical value of time before conversion. }
52   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: in\_unit
53                               \textcolor{comment}{! 変換前の時間の単位. }
54                               \textcolor{comment}{! }
55                               \textcolor{comment}{! Units of time before conversion. }
56   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
57                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
58                               \textcolor{comment}{! }
59                               \textcolor{comment}{! An object that stores information of }
60                               \textcolor{comment}{! calendar. }
61 
62   \textcolor{comment}{! 作業変数}
63   \textcolor{comment}{! Work variables}
64   \textcolor{comment}{!}
65   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
66   \textcolor{keywordtype}{integer}:: in\_unit\_sym, out\_unit\_sym
67 \textcolor{comment}{!!$  integer:: stat}
68 \textcolor{comment}{!!$  character(STRING):: cause\_c}
69   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalConvertToSec1'}
70 \textcolor{keywordflow}{continue}
71 \textcolor{comment}{!!$  call BeginSub( subname )}
72 \textcolor{comment}{!!$  stat = DC\_NOERR}
73 \textcolor{comment}{!!$  cause\_c = ''}
74 
75   out\_time = -1.0
76 
77   \textcolor{comment}{! オブジェクトのポインタ割付}
78   \textcolor{comment}{! Associate pointer of an object}
79   \textcolor{comment}{!}
80   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
81     calp => cal
82   \textcolor{keywordflow}{else}
83     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
84     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
85 \textcolor{keywordflow}{  end if}
86 
87   \textcolor{comment}{! 初期設定のチェック}
88   \textcolor{comment}{! Check initialization}
89   \textcolor{comment}{!}
90   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
91     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'"cal" is not initialized. <-1> is returned.'} )
92 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
93 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL'}
94     \textcolor{keywordflow}{goto} 999
95 \textcolor{keywordflow}{  end if}
96 
97   \textcolor{comment}{! 単位の解釈}
98   \textcolor{comment}{! Parse units}
99   \textcolor{comment}{!}
100   in\_unit\_sym  = \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}( in\_unit )
101   out\_unit\_sym = \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
102 
103   \textcolor{comment}{! 数値の変換}
104   \textcolor{comment}{! Convert a value}
105   \textcolor{comment}{!}
106   out\_time = \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( in\_time, in\_unit\_sym, out\_unit\_sym, cal )
107 
108   \textcolor{comment}{! 終了処理, 例外処理}
109   \textcolor{comment}{! Termination and Exception handling}
110   \textcolor{comment}{!}
111 999 \textcolor{keywordflow}{continue}
112   \textcolor{keyword}{nullify}( calp )
113 \textcolor{comment}{!!$  call StoreError( stat, subname, err, cause\_c )}
114 \textcolor{comment}{!!$  call EndSub( subname )}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccalconverttosec_8f90_a0009fdd8e25face93e79f28d9999f493_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{dccalconverttosec_8f90_a62740b64f348214330eaa10edcdc6c90}\label{dccalconverttosec_8f90_a62740b64f348214330eaa10edcdc6c90}} 
\index{dccalconverttosec.\+f90@{dccalconverttosec.\+f90}!dccalconverttosec2@{dccalconverttosec2}}
\index{dccalconverttosec2@{dccalconverttosec2}!dccalconverttosec.\+f90@{dccalconverttosec.\+f90}}
\subsubsection{\texorpdfstring{dccalconverttosec2()}{dccalconverttosec2()}}
{\footnotesize\ttfamily real(dp) function dccalconverttosec2 (\begin{DoxyParamCaption}\item[{real(dp), intent(in)}]{in\+\_\+time,  }\item[{integer, intent(in)}]{in\+\_\+unit,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal }\end{DoxyParamCaption})}



Definition at line 120 of file dccalconverttosec.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+ebadunit, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaldate\+\_\+str2usym(), dc\+\_\+calendar\+\_\+internal\+::dccaltype\+\_\+str(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+day, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+hour, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+min, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+month, dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+sec, and dc\+\_\+calendar\+\_\+types\+::unit\+\_\+symbol\+\_\+year.


\begin{DoxyCode}
120   \textcolor{comment}{!}
121   \textcolor{comment}{! 任意の時間単位 (日時分秒) から秒への単位の変換を行います. }
122   \textcolor{comment}{! }
123   \textcolor{comment}{! 時間の単位として有効な整数型変数については以下を参照下さい. }
124   \textcolor{comment}{! 単位として整数値を直接与えることはせず, 以下の変数を}
125   \textcolor{comment}{! 与えてください. }
126   \textcolor{comment}{!}
127   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_SEC          :: 秒の単位}
128   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_MIN          :: 分の単位}
129   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_HOUR         :: 時間の単位}
130   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_DAY          :: 日の単位}
131   \textcolor{comment}{! }
132   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, dc\_calendar 内部で}
133   \textcolor{comment}{! 保持される暦に関する情報を用いた単位の変換が行われます. }
134   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦の情報を}
135   \textcolor{comment}{! 用いて単位の変換が行われます. }
136   \textcolor{comment}{!}
137   \textcolor{comment}{! Convert of unit from arbitrary time units (day, hour, minute, second) }
138   \textcolor{comment}{! into sec. }
139   \textcolor{comment}{!}
140   \textcolor{comment}{! Valid integer variables as units of time are follows. }
141   \textcolor{comment}{! Do not specify integer directly, but specify following variables. }
142   \textcolor{comment}{! }
143   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_SEC          :: Units of second}
144   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_MIN          :: Units of minute}
145   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_HOUR         :: Units of hour}
146   \textcolor{comment}{! dc\_calendar\_types#UNIT\_SYMBOL\_DAY          :: Units of day}
147   \textcolor{comment}{!}
148   \textcolor{comment}{! If an optional argument *cal* is omitted, }
149   \textcolor{comment}{! unit is converted with information of a calendar }
150   \textcolor{comment}{! that is stored in the "dc\_calendar". }
151   \textcolor{comment}{! If *cal* is not omitted, unit is converted with information of the variable.}
152   \textcolor{comment}{!}
153   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__internal}{dc\_calendar\_internal}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}, 
      \hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}, &
154     & \hyperlink{namespacedc__calendar__internal_aa5cfbed96ce640b2c6dd7bc0df513872}{dccaltype\_str}, \hyperlink{namespacedc__calendar__internal_ae2ad5ba61c1d074aea90ec876012150c}{dccaldate\_str2usym}
155   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__generic}{dc\_calendar\_generic}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}
156   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: \hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}, &
157     & \hyperlink{namespacedc__calendar__types_a9f02aaa42bc65301b0f6e86c34f5e975}{unit\_symbol\_year}, \hyperlink{namespacedc__calendar__types_a6a2218105981b62304a32c51f20e0824}{unit\_symbol\_month}, 
      \hyperlink{namespacedc__calendar__types_ab4be572292ddec215a2e956866a4d893}{unit\_symbol\_day}, &
158     & \hyperlink{namespacedc__calendar__types_ab35dfa690b91efaf7cfc2d056da4629b}{unit\_symbol\_hour}, \hyperlink{namespacedc__calendar__types_ac941d6da4d3fd07f09b543d20796e606}{unit\_symbol\_min}, 
      \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
159   \textcolor{keywordtype}{use }\hyperlink{namespacedc__error}{dc\_error}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}, \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}, 
      \hyperlink{namespacedc__error_a19b63488d4f7bc5507179bb795640f5f}{dc\_ebadunit}, \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
160   \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
161   \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
162   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
163   \textcolor{keywordtype}{implicit none}
164   \textcolor{keywordtype}{real(DP)}:: out\_time
165                               \textcolor{comment}{! 変換後の時間の数値. }
166                               \textcolor{comment}{! }
167                               \textcolor{comment}{! Numerical value of time after conversion. }
168   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(in)}:: in\_time
169                               \textcolor{comment}{! 変換前の時間の数値. }
170                               \textcolor{comment}{! }
171                               \textcolor{comment}{! Numerical value of time before conversion. }
172   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)}:: in\_unit
173                               \textcolor{comment}{! 変換前の時間の単位. }
174                               \textcolor{comment}{! }
175                               \textcolor{comment}{! Units of time before conversion. }
176   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
177                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
178                               \textcolor{comment}{! }
179                               \textcolor{comment}{! An object that stores information of }
180                               \textcolor{comment}{! calendar. }
181 
182   \textcolor{comment}{! 作業変数}
183   \textcolor{comment}{! Work variables}
184   \textcolor{comment}{!}
185   \textcolor{keywordtype}{type}(\hyperlink{structdc__calendar__types_1_1dc__cal}{dc\_cal}), \textcolor{keywordtype}{pointer}:: calp =>null()
186   \textcolor{keywordtype}{integer}:: out\_unit
187                               \textcolor{comment}{! 変換後の時間の単位. }
188                               \textcolor{comment}{! }
189                               \textcolor{comment}{! Units of time after conversion. }
190 
191 \textcolor{comment}{!!$  integer:: stat}
192 \textcolor{comment}{!!$  character(STRING):: cause\_c}
193   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalConvertToSec2'}
194 \textcolor{keywordflow}{continue}
195 \textcolor{comment}{!!$  call BeginSub( subname )}
196 \textcolor{comment}{!!$  stat = DC\_NOERR}
197 \textcolor{comment}{!!$  cause\_c = ''}
198 
199   out\_time = -1.0
200 
201   \textcolor{comment}{! オブジェクトのポインタ割付}
202   \textcolor{comment}{! Associate pointer of an object}
203   \textcolor{comment}{!}
204   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
205     calp => cal
206   \textcolor{keywordflow}{else}
207     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
208     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
209 \textcolor{keywordflow}{  end if}
210 
211   \textcolor{comment}{! 初期設定のチェック}
212   \textcolor{comment}{! Check initialization}
213   \textcolor{comment}{!}
214   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
215     \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'"cal" is not initialized. <-1> is returned.'} )
216 \textcolor{comment}{!!$    stat = DC\_ENOTINIT}
217 \textcolor{comment}{!!$    cause\_c = 'DC\_CAL'}
218     \textcolor{keywordflow}{goto} 999
219 \textcolor{keywordflow}{  end if}
220 
221   \textcolor{comment}{! 単位の解釈}
222   \textcolor{comment}{! Parse units}
223   \textcolor{comment}{!}
224   out\_unit = \hyperlink{namespacedc__calendar__types_a15ce2d6947c7143915fa55b6549d4997}{unit\_symbol\_sec}
225 
226   \textcolor{comment}{! 数値の変換}
227   \textcolor{comment}{! Convert a value}
228   \textcolor{comment}{!}
229   out\_time = \hyperlink{interfacedc__calendar__generic_1_1dccalconvertbyunit}{dccalconvertbyunit}( in\_time, in\_unit, out\_unit, cal )
230 
231   \textcolor{comment}{! 終了処理, 例外処理}
232   \textcolor{comment}{! Termination and Exception handling}
233   \textcolor{comment}{!}
234 999 \textcolor{keywordflow}{continue}
235   \textcolor{keyword}{nullify}( calp )
236 \textcolor{comment}{!!$  call StoreError( stat, subname, err, cause\_c )}
237 \textcolor{comment}{!!$  call EndSub( subname )}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccalconverttosec_8f90_a62740b64f348214330eaa10edcdc6c90_cgraph}
\end{center}
\end{figure}
