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


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



Definition at line 13 of file hstnmlinfosetvalidname.\+f90.



References dc\+\_\+trace\+::beginsub(), dc\+\_\+error\+::dc\+\_\+earglack, dc\+\_\+error\+::dc\+\_\+enoentry, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+trace\+::endsub(), dc\+\_\+string\+::joinchar(), gtool\+\_\+history\+\_\+nmlinfo\+\_\+internal\+::name\+\_\+delimiter, dc\+\_\+present\+::present\+\_\+and\+\_\+not\+\_\+empty(), dc\+\_\+present\+::present\+\_\+and\+\_\+true(), dc\+\_\+types\+::stdout, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, and dc\+\_\+types\+::token.


\begin{DoxyCode}
13     \textcolor{comment}{!}
14     \textcolor{comment}{! 変数名の有効性を設定. }
15     \textcolor{comment}{!}
16     \textcolor{comment}{! 無効な変数名を検知するため, このサブルーチンで}
17     \textcolor{comment}{! 有効な変数に対しては明示的に設定を行います. }
18     \textcolor{comment}{! }
19     \textcolor{comment}{! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定}
20     \textcolor{comment}{! されていない場合, プログラムはエラーを発生させます. }
21     \textcolor{comment}{!}
22     \textcolor{comment}{! Set validation to variable names. }
23     \textcolor{comment}{! }
24     \textcolor{comment}{! For detection of invalid variable names, }
25     \textcolor{comment}{! Set validation to variable names explicitly by this }
26     \textcolor{comment}{! subroutine. }
27     \textcolor{comment}{!}
28     \textcolor{comment}{! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet, }
29     \textcolor{comment}{! error is occurred.}
30     \textcolor{comment}{!}
31     \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}
32     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__internal}{gtool\_history\_nmlinfo\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{interfacegtool__history__nmlinfo__internal_1_1listsearch}{listsearch}, \hyperlink{interfacegtool__history__nmlinfo__internal_1_1listnext}{listnext}
33     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__internal}{gtool\_history\_nmlinfo\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{namespacegtool__history__nmlinfo__internal_a70f5d905a8fb6970a88cf6bf122ab858}{name\_delimiter}
34     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history}{gtool\_history}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtool__history__generic_1_1historyinitialized}{historyinitialized}
35     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}
36     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__generic_1_1putline}{putline}, \hyperlink{interfacedc__string_1_1printf}{printf}, \hyperlink{interfacedc__string_1_1split}{split}, 
      \hyperlink{interfacedc__string_1_1strinclude}{strinclude}, \hyperlink{interfacedc__string_1_1stoa}{stoa}, \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}
37     \textcolor{keywordtype}{use }\hyperlink{namespacedc__present}{dc\_present}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__present_aae281a56bc41e9546908a72aeb042430}{present\_and\_not\_empty}, 
      \hyperlink{namespacedc__present_ab280582985ee69fda00e2a0bf09194af}{present\_and\_true}
38     \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}
39     \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_a4e4bfd987a6af527e5b7514dd7535f85}{dc\_earglack}, \hyperlink{namespacedc__error_ae5f73ad2e691edb0b6bd1bf837604d5e}{dc\_enoentry}
40     \textcolor{keywordtype}{implicit none}
41     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo}{gthst\_nmlinfo}), \textcolor{keywordtype}{intent(in)}:: gthstnml
42     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name
43                               \textcolor{comment}{! 有効であることを設定する変数名. }
44                               \textcolor{comment}{! }
45                               \textcolor{comment}{! "Data1,Data2" のようにカンマで区切って複数}
46                               \textcolor{comment}{! の変数を指定することも可能です. }
47                               \textcolor{comment}{! }
48                               \textcolor{comment}{! A variable name that is set validation. }
49                               \textcolor{comment}{! }
50                               \textcolor{comment}{! Multiple variables can be specified }
51                               \textcolor{comment}{! as "Data1,Data2" too. Delimiter is comma. }
52     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
53                               \textcolor{comment}{! 例外処理用フラグ. }
54                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
55                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
56                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
57                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
58                               \textcolor{comment}{! *err* に .true. が代入されます. }
59                               \textcolor{comment}{!}
60                               \textcolor{comment}{! Exception handling flag. }
61                               \textcolor{comment}{! By default, when error occur in }
62                               \textcolor{comment}{! this procedure, the program aborts. }
63                               \textcolor{comment}{! If this *err* argument is given, }
64                               \textcolor{comment}{! .true. is substituted to *err* and }
65                               \textcolor{comment}{! the program does not abort. }
66 
67     \textcolor{comment}{!-----------------------------------}
68     \textcolor{comment}{!  作業変数}
69     \textcolor{comment}{!  Work variables}
70     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}), \textcolor{keywordtype}{pointer}:: hptr =>null()
71     \textcolor{keywordtype}{character(TOKEN)}, \textcolor{keywordtype}{pointer}:: varnames\_array(:) =>null()
72     \textcolor{keywordtype}{integer}:: i, vnmax
73     \textcolor{keywordtype}{integer}:: stat
74     \textcolor{keywordtype}{character(STRING)}:: cause\_c
75     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'HstNmlInfoSetValidName'}
76   \textcolor{keywordflow}{continue}
77     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}( subname, fmt = \textcolor{stringliteral}{'@name=%c'}, c1 = trim(name) )
78     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
79     cause\_c = \textcolor{stringliteral}{''}
80 
81     \textcolor{comment}{!-----------------------------------------------------------------}
82     \textcolor{comment}{!  初期設定のチェック}
83     \textcolor{comment}{!  Check initialization}
84     \textcolor{comment}{!-----------------------------------------------------------------}
85     \textcolor{keywordflow}{if} ( .not. gthstnml % initialized ) \textcolor{keywordflow}{then}
86       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
87       cause\_c = \textcolor{stringliteral}{'GTHST\_NMLINFO'}
88       \textcolor{keywordflow}{goto} 999
89 \textcolor{keywordflow}{    end if}
90 
91     \textcolor{comment}{!-----------------------------------------------------------------}
92     \textcolor{comment}{!  複数の変数名の取り扱い}
93     \textcolor{comment}{!  Handle multiple variables}
94     \textcolor{comment}{!-----------------------------------------------------------------}
95     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1split}{split}( str = name, sep = \hyperlink{namespacegtool__history__nmlinfo__internal_a70f5d905a8fb6970a88cf6bf122ab858}{name\_delimiter}, & \textcolor{comment}{! (in)}
96       & carray = varnames\_array )                   \textcolor{comment}{! (out)}
97     vnmax = \textcolor{keyword}{size}( varnames\_array )
98 
99     \textcolor{comment}{!-----------------------------------------------------------------}
100     \textcolor{comment}{!  *gthstnml* 内から, *name* に関する情報を探査.}
101     \textcolor{comment}{!  Search information correspond to *name* in *gthstnml*}
102     \textcolor{comment}{!-----------------------------------------------------------------}
103     \textcolor{keywordflow}{do} i = 1, vnmax
104       hptr => gthstnml % gthstnml\_list
105       \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__internal_1_1listsearch}{listsearch}( gthstnml\_list = hptr, &    \textcolor{comment}{! (inout)}
106         &              name = varnames\_array(i) ) \textcolor{comment}{! (in)}
107       \textcolor{keywordflow}{if} ( \textcolor{keyword}{associated}( hptr ) ) \textcolor{keywordflow}{then}
108         hptr % name\_invalid = .false.
109 \textcolor{keywordflow}{      end if}
110 \textcolor{keywordflow}{    end do}
111 
112     \textcolor{comment}{!-----------------------------------------------------------------}
113     \textcolor{comment}{!  終了処理, 例外処理}
114     \textcolor{comment}{!  Termination and Exception handling}
115     \textcolor{comment}{!-----------------------------------------------------------------}
116 999 \textcolor{keywordflow}{continue}
117     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
118     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}( subname )
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{hstnmlinfosetvalidname_8f90_a0452269e5096c5a1baa788ca56a1799b_cgraph}
\end{center}
\end{figure}
