\hypertarget{hstnmlinfoassocgthist_8f90}{}\section{gtool/gtool\+\_\+history\+\_\+nmlinfo/hstnmlinfoassocgthist.f90 File Reference}
\label{hstnmlinfoassocgthist_8f90}\index{gtool/gtool\+\_\+history\+\_\+nmlinfo/hstnmlinfoassocgthist.\+f90@{gtool/gtool\+\_\+history\+\_\+nmlinfo/hstnmlinfoassocgthist.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{hstnmlinfoassocgthist_8f90_a4ecfe59f7d0084e0599cddf96600e95c}{hstnmlinfoassocgthist} (gthstnml, name, history, err)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{hstnmlinfoassocgthist_8f90_a4ecfe59f7d0084e0599cddf96600e95c}\label{hstnmlinfoassocgthist_8f90_a4ecfe59f7d0084e0599cddf96600e95c}} 
\index{hstnmlinfoassocgthist.\+f90@{hstnmlinfoassocgthist.\+f90}!hstnmlinfoassocgthist@{hstnmlinfoassocgthist}}
\index{hstnmlinfoassocgthist@{hstnmlinfoassocgthist}!hstnmlinfoassocgthist.\+f90@{hstnmlinfoassocgthist.\+f90}}
\subsubsection{\texorpdfstring{hstnmlinfoassocgthist()}{hstnmlinfoassocgthist()}}
{\footnotesize\ttfamily subroutine hstnmlinfoassocgthist (\begin{DoxyParamCaption}\item[{type(gthst\+\_\+nmlinfo), intent(in)}]{gthstnml,  }\item[{character($\ast$), intent(in)}]{name,  }\item[{type(gt\+\_\+history), pointer}]{history,  }\item[{logical, intent(out), optional}]{err }\end{DoxyParamCaption})}



Definition at line 12 of file hstnmlinfoassocgthist.\+f90.



References dc\+\_\+error\+::dc\+\_\+enoentry, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+error\+::hst\+\_\+ebadname, dc\+\_\+error\+::hst\+\_\+eindefine, dc\+\_\+types\+::stdout, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
12     \textcolor{comment}{!}
13     \textcolor{comment}{! 与えられた gtool\_history\_types#GT\_HISTORY 型のポインタ *history* に対し, }
14     \textcolor{comment}{! *gthstnml* 内の *name* に関する gtool\_history\_types#GT\_HISTORY 型変数を}
15     \textcolor{comment}{! 結合します. }
16     \textcolor{comment}{! 空状態の *history* を与えてください. }
17     \textcolor{comment}{!}
18     \textcolor{comment}{! HstNmlInfoEndDefine で定義モードから出力モードに}
19     \textcolor{comment}{! 移行した後に呼び出してください. }
20     \textcolor{comment}{! HstNmlInfoEndDefine を呼ぶ前にこのサブルーチンを使用すると, }
21     \textcolor{comment}{! プログラムはエラーを発生させます. }
22     \textcolor{comment}{!}
23     \textcolor{comment}{! *name* に関する情報が見当たらない場合, }
24     \textcolor{comment}{! プログラムはエラーを発生させます. }
25     \textcolor{comment}{! *name* が空文字の場合にも, }
26     \textcolor{comment}{! プログラムはエラーを発生させます. }
27     \textcolor{comment}{!}
28     \textcolor{comment}{! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定}
29     \textcolor{comment}{! されていない場合にも, プログラムはエラーを発生させます. }
30     \textcolor{comment}{!}
31     \textcolor{comment}{! This subroutine associates given "gtool\_history\_types#GT\_HISTORY" }
32     \textcolor{comment}{! pointer *history* to }
33     \textcolor{comment}{! "gtool\_history\_types#GT\_HISTORY" correspond to *name* in *gthstnml*. }
34     \textcolor{comment}{! Give null *history*. }
35     \textcolor{comment}{!}
36     \textcolor{comment}{! Use after state is changed from define mode to}
37     \textcolor{comment}{! output mode by "HstNmlInfoEndDefine". }
38     \textcolor{comment}{! If this subroutine is used before }
39     \textcolor{comment}{! "HstNmlInfoEndDefine" is used, error is occurred. }
40     \textcolor{comment}{!}
41     \textcolor{comment}{! When data correspond to *name* is not found, }
42     \textcolor{comment}{! error is occurred.}
43     \textcolor{comment}{! When *name* is blank, }
44     \textcolor{comment}{! error is occurred too.}
45     \textcolor{comment}{! }
46     \textcolor{comment}{! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet, }
47     \textcolor{comment}{! error is occurred.}
48     \textcolor{comment}{!}
49     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__types}{gtool\_history\_nmlinfo\_types}\textcolor{keywordtype}{, only}: 
      \hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo}{gthst\_nmlinfo}, \hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}
50     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__internal}{gtool\_history\_nmlinfo\_internal}\textcolor{keywordtype}{, only}: listsearch
51     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: gt\_history
52     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub
53     \textcolor{keywordtype}{use }dc\_string\textcolor{keywordtype}{, only}: putline, printf, split, strinclude, stoa, joinchar
54     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_ac74a34430fcd3d0eb2344f19d536c086}{dp}, \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a6d28eb015ba84292a06f4ff25165b376}{token}, \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
55     \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}, \hyperlink{namespacedc__error_ae5f73ad2e691edb0b6bd1bf837604d5e}{dc\_enoentry}, \hyperlink{namespacedc__error_ae116df7460f0623509a40a559f53698a}{hst\_ebadname}, 
      \hyperlink{namespacedc__error_a8c9f0f2a4a794e70f50cb768091c75ec}{hst\_eindefine}
56     \textcolor{keywordtype}{implicit none}
57     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo}{gthst\_nmlinfo}), \textcolor{keywordtype}{intent(in)}:: gthstnml
58     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name
59                               \textcolor{comment}{! 変数名. }
60                               \textcolor{comment}{! 先頭の空白は無視されます. }
61                               \textcolor{comment}{! }
62                               \textcolor{comment}{! Variable identifier. }
63                               \textcolor{comment}{! Blanks at the head of the name are ignored. }
64     \textcolor{keywordtype}{type}(gt\_history), \textcolor{keywordtype}{pointer}:: history
65                               \textcolor{comment}{! (out)}
66                               \textcolor{comment}{! }
67                               \textcolor{comment}{! gtool\_history モジュール用構造体. }
68                               \textcolor{comment}{! Derived type for "gtool\_history" module}
69     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
70                               \textcolor{comment}{! 例外処理用フラグ. }
71                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
72                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
73                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
74                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
75                               \textcolor{comment}{! *err* に .true. が代入されます. }
76                               \textcolor{comment}{!}
77                               \textcolor{comment}{! Exception handling flag. }
78                               \textcolor{comment}{! By default, when error occur in }
79                               \textcolor{comment}{! this procedure, the program aborts. }
80                               \textcolor{comment}{! If this *err* argument is given, }
81                               \textcolor{comment}{! .true. is substituted to *err* and }
82                               \textcolor{comment}{! the program does not abort. }
83 
84     \textcolor{comment}{!-----------------------------------}
85     \textcolor{comment}{!  作業変数}
86     \textcolor{comment}{!  Work variables}
87     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}), \textcolor{keywordtype}{pointer}:: hptr =>null()
88     \textcolor{keywordtype}{integer}:: stat
89     \textcolor{keywordtype}{character(STRING)}:: cause\_c
90     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'HstNmlInfoAssocGtHist'}
91   \textcolor{keywordflow}{continue}
92     \textcolor{keyword}{call }beginsub( subname )
93     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
94     cause\_c = \textcolor{stringliteral}{''}
95 
96     \textcolor{comment}{!-----------------------------------------------------------------}
97     \textcolor{comment}{!  初期設定のチェック}
98     \textcolor{comment}{!  Check initialization}
99     \textcolor{comment}{!-----------------------------------------------------------------}
100     \textcolor{keywordflow}{if} ( .not. gthstnml % initialized ) \textcolor{keywordflow}{then}
101       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
102       cause\_c = \textcolor{stringliteral}{'GTHST\_NMLINFO'}
103       \textcolor{keywordflow}{goto} 999
104 \textcolor{keywordflow}{    end if}
105 
106     \textcolor{keywordflow}{if} ( trim( name ) == \textcolor{stringliteral}{''} ) \textcolor{keywordflow}{then}
107       stat = \hyperlink{namespacedc__error_ae116df7460f0623509a40a559f53698a}{hst\_ebadname}
108       cause\_c = \textcolor{stringliteral}{''}
109       \textcolor{keywordflow}{goto} 999
110 \textcolor{keywordflow}{    end if}
111 
112     \textcolor{keywordflow}{if} ( gthstnml % define\_mode ) \textcolor{keywordflow}{then}
113       stat = \hyperlink{namespacedc__error_a8c9f0f2a4a794e70f50cb768091c75ec}{hst\_eindefine}
114       cause\_c = \textcolor{stringliteral}{'AssocGtHist'}
115       \textcolor{keywordflow}{goto} 999
116 \textcolor{keywordflow}{    end if}
117 
118     \textcolor{comment}{!-----------------------------------------------------------------}
119     \textcolor{comment}{!  *gthstnml* 内から, *name* に関する history を探査.}
120     \textcolor{comment}{!  Search "history" correspond to *name* in *gthstnml*}
121     \textcolor{comment}{!-----------------------------------------------------------------}
122     hptr => gthstnml % gthstnml\_list
123     \textcolor{keyword}{call }listsearch( gthstnml\_list = hptr, & \textcolor{comment}{! (inout)}
124       &              name = name )           \textcolor{comment}{! (in)}
125 
126     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( hptr ) ) \textcolor{keywordflow}{then}
127       stat = \hyperlink{namespacedc__error_ae5f73ad2e691edb0b6bd1bf837604d5e}{dc\_enoentry}
128       cause\_c = adjustl( name )
129       \textcolor{keywordflow}{goto} 999
130 \textcolor{keywordflow}{    end if}
131 
132     \textcolor{keyword}{nullify}( history )
133     history => hptr % history
134 
135     \textcolor{keyword}{nullify}( hptr )
136 
137     \textcolor{comment}{!-----------------------------------------------------------------}
138     \textcolor{comment}{!  終了処理, 例外処理}
139     \textcolor{comment}{!  Termination and Exception handling}
140     \textcolor{comment}{!-----------------------------------------------------------------}
141 999 \textcolor{keywordflow}{continue}
142     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
143     \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]{hstnmlinfoassocgthist_8f90_a4ecfe59f7d0084e0599cddf96600e95c_cgraph}
\end{center}
\end{figure}
