\hypertarget{dccalinquire_8f90}{}\section{dc\+\_\+utils/dccalinquire.f90 File Reference}
\label{dccalinquire_8f90}\index{dc\+\_\+utils/dccalinquire.\+f90@{dc\+\_\+utils/dccalinquire.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{dccalinquire_8f90_a29685ee53473f553d188eb9a58672123}{dccalinquire1} (cal\+\_\+type, month\+\_\+in\+\_\+year, day\+\_\+in\+\_\+month, day\+\_\+in\+\_\+month\+\_\+ptr, hour\+\_\+in\+\_\+day, min\+\_\+in\+\_\+hour, sec\+\_\+in\+\_\+min, cal, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{dccalinquire_8f90_a29685ee53473f553d188eb9a58672123}\label{dccalinquire_8f90_a29685ee53473f553d188eb9a58672123}} 
\index{dccalinquire.\+f90@{dccalinquire.\+f90}!dccalinquire1@{dccalinquire1}}
\index{dccalinquire1@{dccalinquire1}!dccalinquire.\+f90@{dccalinquire.\+f90}}
\subsubsection{\texorpdfstring{dccalinquire1()}{dccalinquire1()}}
{\footnotesize\ttfamily subroutine dccalinquire1 (\begin{DoxyParamCaption}\item[{character($\ast$), intent(out), optional}]{cal\+\_\+type,  }\item[{integer, intent(out), optional}]{month\+\_\+in\+\_\+year,  }\item[{integer, dimension(\+:), intent(out), optional}]{day\+\_\+in\+\_\+month,  }\item[{integer, dimension(\+:), optional, pointer}]{day\+\_\+in\+\_\+month\+\_\+ptr,  }\item[{integer, intent(out), optional}]{hour\+\_\+in\+\_\+day,  }\item[{integer, intent(out), optional}]{min\+\_\+in\+\_\+hour,  }\item[{real(dp), intent(out), optional}]{sec\+\_\+in\+\_\+min,  }\item[{type(dc\+\_\+cal), intent(in), optional, target}]{cal,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 19 of file dccalinquire.\+f90.



References dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+calendar\+\_\+internal\+::dccaltype\+\_\+str(), dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal, dc\+\_\+calendar\+\_\+internal\+::default\+\_\+cal\+\_\+set(), dc\+\_\+types\+::dp, dc\+\_\+error\+::storeerror(), and dc\+\_\+types\+::string.


\begin{DoxyCode}
19   \textcolor{comment}{!}
20   \textcolor{comment}{! 暦情報の問い合わせを行います. }
21   \textcolor{comment}{!}
22   \textcolor{comment}{! *cal\_type* には以下の文字列が返ります. }
23   \textcolor{comment}{!}
24   \textcolor{comment}{! gregorian         :: グレゴリオ暦}
25   \textcolor{comment}{! julian            :: ユリウス暦}
26   \textcolor{comment}{! noleap            :: 閏年無しの暦}
27   \textcolor{comment}{! 360day            :: 1ヶ月が 30 日の暦}
28   \textcolor{comment}{! cyclic            :: ある月の日数を}
29   \textcolor{comment}{!                      「30.6 × 月数 − 前月までの総日数」}
30   \textcolor{comment}{!                      の小数点以下切捨とする暦}
31   \textcolor{comment}{! user\_defined      :: ユーザ定義の暦}
32   \textcolor{comment}{!}
33   \textcolor{comment}{! 省略可能引数 *cal* が省略された場合には, dc\_calendar 内部で}
34   \textcolor{comment}{! 保持される暦に関する情報が得られます. }
35   \textcolor{comment}{! *cal* が省略されない場合にはその変数に設定された暦の情報が得られます. }
36   \textcolor{comment}{!}
37   \textcolor{comment}{! Inquire information of calendar. }
38   \textcolor{comment}{!}
39   \textcolor{comment}{! Following strings are returned to *cal\_type*. }
40   \textcolor{comment}{!}
41   \textcolor{comment}{! gregorian         :: Gregorian calendar. }
42   \textcolor{comment}{! julian            :: Julian calendar. }
43   \textcolor{comment}{! noleap            :: A calendar without leap year. }
44   \textcolor{comment}{! 360day            :: A calendar in which number of days of a month is 30. }
45   \textcolor{comment}{! cyclic            :: A calendar in which number of days of a year is}
46   \textcolor{comment}{!                      "30.6 x (number of months) - (total days until last month)"}
47   \textcolor{comment}{!                      (truncate fractional part). }
48   \textcolor{comment}{! user\_defined      :: User defined calendar}
49   \textcolor{comment}{!}
50   \textcolor{comment}{! If an optional argument *cal* is omitted, }
51   \textcolor{comment}{! information of a calendar that is stored in the "dc\_calendar"}
52   \textcolor{comment}{! is returned, }
53   \textcolor{comment}{! If *cal* is not omitted, information of the variable is returned. }
54   \textcolor{comment}{!}
55 
56   \textcolor{keywordtype}{use }\hyperlink{namespacedc__calendar__types}{dc\_calendar\_types}\textcolor{keywordtype}{, only}: dc\_cal
57   \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}, \hyperlink{namespacedc__calendar__internal_aa5cfbed96ce640b2c6dd7bc0df513872}{dccaltype\_str}
58   \textcolor{keywordtype}{use }dc\_message\textcolor{keywordtype}{, only}: messagenotify
59   \textcolor{keywordtype}{use }dc\_string\textcolor{keywordtype}{, only}: lchar
60   \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub
61   \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_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
62   \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}
63   \textcolor{keywordtype}{implicit none}
64   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: cal\_type
65                               \textcolor{comment}{! 暦の種類を示す文字列. }
66                               \textcolor{comment}{! }
67                               \textcolor{comment}{! Strings that specify a kind of calendar. }
68   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: month\_in\_year
69                               \textcolor{comment}{! 1 年の月数. }
70                               \textcolor{comment}{! Months in a year. }
71   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: day\_in\_month(:)
72                               \textcolor{comment}{! 1 ヶ月の日数. }
73                               \textcolor{comment}{! グレゴリオ暦の場合, 配列の 2 番目の要素 (2月) }
74                               \textcolor{comment}{! には必ず 28 が返ります. }
75                               \textcolor{comment}{!}
76                               \textcolor{comment}{! Days in months. }
77                               \textcolor{comment}{! In Gregorian calendar, 28 is returned to }
78                               \textcolor{comment}{! 2nd position of the array (February) }
79                               \textcolor{comment}{! at all times. }
80                               \textcolor{comment}{!}
81   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{pointer}, \textcolor{keywordtype}{optional}:: day\_in\_month\_ptr(:)
82                               \textcolor{comment}{! 1 ヶ月の日数 (ポインタ). }
83                               \textcolor{comment}{! グレゴリオ暦の場合, 配列の 2 番目の要素 (2月) }
84                               \textcolor{comment}{! には必ず 28 が返ります. }
85                               \textcolor{comment}{!}
86                               \textcolor{comment}{! Days in months (pointer). }
87                               \textcolor{comment}{! In Gregorian calendar, 28 is returned to }
88                               \textcolor{comment}{! 2nd position of the array (February) }
89                               \textcolor{comment}{! at all times. }
90                               \textcolor{comment}{!}
91   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: hour\_in\_day
92                               \textcolor{comment}{! 1 日の時間数. }
93                               \textcolor{comment}{! Hours in a day. }
94   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: min\_in\_hour
95                               \textcolor{comment}{! 1 時間の分数. }
96                               \textcolor{comment}{! Minutes in a hour. }
97   \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: sec\_in\_min
98                               \textcolor{comment}{! 1 分の秒数. }
99                               \textcolor{comment}{! Seconds in a minute. }
100   \textcolor{keywordtype}{type}(dc\_cal), \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{target}:: cal
101                               \textcolor{comment}{! 暦情報を収めたオブジェクト. }
102                               \textcolor{comment}{! }
103                               \textcolor{comment}{! An object that stores information of }
104                               \textcolor{comment}{! calendar. }
105   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
106                               \textcolor{comment}{! 例外処理用フラグ. }
107                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
108                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
109                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
110                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
111                               \textcolor{comment}{! *err* に .true. が代入されます. }
112                               \textcolor{comment}{!}
113                               \textcolor{comment}{! Exception handling flag. }
114                               \textcolor{comment}{! By default, when error occur in }
115                               \textcolor{comment}{! this procedure, the program aborts. }
116                               \textcolor{comment}{! If this *err* argument is given, }
117                               \textcolor{comment}{! .true. is substituted to *err* and }
118                               \textcolor{comment}{! the program does not abort. }
119 
120 
121   \textcolor{comment}{! 作業変数}
122   \textcolor{comment}{! Work variables}
123   \textcolor{comment}{!}
124   \textcolor{keywordtype}{type}(dc\_cal), \textcolor{keywordtype}{pointer}:: calp =>null()
125   \textcolor{keywordtype}{integer}:: siz\_dm
126   \textcolor{keywordtype}{integer}:: stat
127   \textcolor{keywordtype}{character(STRING)}:: cause\_c
128   \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'DCCalInquire1'}
129 \textcolor{keywordflow}{continue}
130   \textcolor{keyword}{call }beginsub( subname )
131   stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
132   cause\_c = \textcolor{stringliteral}{''}
133 
134   \textcolor{comment}{! オブジェクトのポインタ割付}
135   \textcolor{comment}{! Associate pointer of an object}
136   \textcolor{comment}{!}
137   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal ) ) \textcolor{keywordflow}{then}
138     calp => cal
139   \textcolor{keywordflow}{else}
140     calp => \hyperlink{namespacedc__calendar__internal_a19929403a35d14fa0c6ce80f5e4392a5}{default\_cal}
141     \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keyword}{call }\hyperlink{namespacedc__calendar__internal_ab33be336dc4b2e284e99c43b24235728}{default\_cal\_set}
142 \textcolor{keywordflow}{  end if}
143 
144   \textcolor{comment}{! 初期設定のチェック}
145   \textcolor{comment}{! Check initialization}
146   \textcolor{comment}{!}
147   \textcolor{keywordflow}{if} ( .not. calp % initialized ) \textcolor{keywordflow}{then}
148     stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
149     cause\_c = \textcolor{stringliteral}{'DC\_CAL'}
150     \textcolor{keywordflow}{goto} 999
151 \textcolor{keywordflow}{  end if}
152 
153   \textcolor{comment}{! 各要素への値の参照}
154   \textcolor{comment}{! Refer elements}
155   \textcolor{comment}{!}
156   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( cal\_type      ) ) \textcolor{keywordflow}{then} 
157     cal\_type = \hyperlink{namespacedc__calendar__internal_aa5cfbed96ce640b2c6dd7bc0df513872}{dccaltype\_str}( calp % cal\_type )
158 \textcolor{keywordflow}{  end if}
159   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( month\_in\_year ) ) month\_in\_year = calp % month\_in\_year
160   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( hour\_in\_day   ) ) hour\_in\_day   = calp % hour\_in\_day
161   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( min\_in\_hour   ) ) min\_in\_hour   = calp % min\_in\_hour
162   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( sec\_in\_min    ) ) sec\_in\_min    = calp % sec\_in\_min
163 
164   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( day\_in\_month     ) ) \textcolor{keywordflow}{then}
165     \textcolor{keywordflow}{if} ( \textcolor{keyword}{size}( day\_in\_month ) > 0 ) \textcolor{keywordflow}{then}
166       day\_in\_month = 0
167       siz\_dm = min( \textcolor{keyword}{size}( day\_in\_month ), \textcolor{keyword}{size}( calp % day\_in\_month ) )
168       day\_in\_month(1:siz\_dm) = calp % day\_in\_month(1:siz\_dm)
169 \textcolor{keywordflow}{    end if}
170 \textcolor{keywordflow}{  end if}
171 
172   \textcolor{keywordflow}{if} ( \textcolor{keyword}{present}( day\_in\_month\_ptr ) ) \textcolor{keywordflow}{then}
173     siz\_dm = \textcolor{keyword}{size}( calp % day\_in\_month )
174     \textcolor{keyword}{allocate}( day\_in\_month\_ptr(1:siz\_dm) )
175     day\_in\_month\_ptr(1:siz\_dm) = calp % day\_in\_month(1:siz\_dm)
176 \textcolor{keywordflow}{  end if}
177 
178   \textcolor{comment}{! 終了処理, 例外処理}
179   \textcolor{comment}{! Termination and Exception handling}
180   \textcolor{comment}{!}
181 999 \textcolor{keywordflow}{continue}
182   \textcolor{keyword}{nullify}( calp )
183   \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
184   \textcolor{keyword}{call }endsub( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{dccalinquire_8f90_a29685ee53473f553d188eb9a58672123_cgraph}
\end{center}
\end{figure}
