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


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



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



References dc\+\_\+error\+::dc\+\_\+earglack, dc\+\_\+error\+::dc\+\_\+enotinit, dc\+\_\+error\+::dc\+\_\+noerr, dc\+\_\+types\+::dp, dc\+\_\+error\+::hst\+\_\+enotindefine, gtool\+\_\+history\+\_\+nmlinfo\+\_\+internal\+::name\+\_\+delimiter, dc\+\_\+types\+::stdout, dc\+\_\+error\+::storeerror(), dc\+\_\+types\+::string, dc\+\_\+types\+::token, and dc\+\_\+error\+::usr\+\_\+errno.


\begin{DoxyCode}
13     \textcolor{comment}{!}
14     \textcolor{comment}{! 変数の出力情報を削除します. }
15     \textcolor{comment}{!}
16     \textcolor{comment}{! なお, 与えられた *gthstnml* が HstNmlInfoCreate によって初期設定}
17     \textcolor{comment}{! されていない場合, プログラムはエラーを発生させます. }
18     \textcolor{comment}{!}
19     \textcolor{comment}{! Delete output information of a variable.}
20     \textcolor{comment}{! }
21     \textcolor{comment}{! If *gthstnml* is not initialized by "HstNmlInfoCreate" yet, }
22     \textcolor{comment}{! error is occurred.}
23     \textcolor{comment}{!}
24     \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}
25     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__internal}{gtool\_history\_nmlinfo\_internal}\textcolor{keywordtype}{, only}: listsearch
26     \textcolor{keywordtype}{use }\hyperlink{namespacegtool__history__nmlinfo__internal}{gtool\_history\_nmlinfo\_internal}\textcolor{keywordtype}{, only}: 
      \hyperlink{namespacegtool__history__nmlinfo__internal_a70f5d905a8fb6970a88cf6bf122ab858}{name\_delimiter}
27     \textcolor{keywordtype}{use }dc\_trace\textcolor{keywordtype}{, only}: beginsub, endsub, dbgmessage
28     \textcolor{keywordtype}{use }dc\_string\textcolor{keywordtype}{, only}: putline, printf, split, strinclude, stoa, joinchar
29     \textcolor{keywordtype}{use }dc\_present\textcolor{keywordtype}{, only}: present\_and\_not\_empty, present\_and\_true
30     \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}
31     \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_a06cf52d1f5684d6d92f7e92c2c1fd43a}{usr\_errno}, 
      \hyperlink{namespacedc__error_ad13dd9239cf193ea3a029747ece73c50}{hst\_enotindefine}
32     \textcolor{keywordtype}{implicit none}
33     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo}{gthst\_nmlinfo}), \textcolor{keywordtype}{intent(inout)}:: gthstnml
34     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: name
35                               \textcolor{comment}{! 変数名. }
36                               \textcolor{comment}{! }
37                               \textcolor{comment}{! 先頭の空白は無視されます. }
38                               \textcolor{comment}{! }
39                               \textcolor{comment}{! "Data1,Data2" のようにカンマで区切って複数}
40                               \textcolor{comment}{! の変数を指定することが可能です. }
41                               \textcolor{comment}{! }
42                               \textcolor{comment}{! Variable identifier. }
43                               \textcolor{comment}{! }
44                               \textcolor{comment}{! Blanks at the head of the name are ignored. }
45                               \textcolor{comment}{! }
46                               \textcolor{comment}{! Multiple variables can be specified }
47                               \textcolor{comment}{! as "Data1,Data2". Delimiter is comma. }
48                               \textcolor{comment}{! }
49     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(out)}, \textcolor{keywordtype}{optional}:: err
50                               \textcolor{comment}{! 例外処理用フラグ. }
51                               \textcolor{comment}{! デフォルトでは, この手続き内でエラーが}
52                               \textcolor{comment}{! 生じた場合, プログラムは強制終了します. }
53                               \textcolor{comment}{! 引数 *err* が与えられる場合, }
54                               \textcolor{comment}{! プログラムは強制終了せず, 代わりに}
55                               \textcolor{comment}{! *err* に .true. が代入されます. }
56                               \textcolor{comment}{!}
57                               \textcolor{comment}{! Exception handling flag. }
58                               \textcolor{comment}{! By default, when error occur in }
59                               \textcolor{comment}{! this procedure, the program aborts. }
60                               \textcolor{comment}{! If this *err* argument is given, }
61                               \textcolor{comment}{! .true. is substituted to *err* and }
62                               \textcolor{comment}{! the program does not abort. }
63 
64     \textcolor{comment}{!-----------------------------------}
65     \textcolor{comment}{!  作業変数}
66     \textcolor{comment}{!  Work variables}
67     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}), \textcolor{keywordtype}{pointer}:: hptr =>null()
68     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}), \textcolor{keywordtype}{pointer}:: hptr\_prev =>null()
69     \textcolor{keywordtype}{type}(\hyperlink{structgtool__history__nmlinfo__types_1_1gthst__nmlinfo__entry}{gthst\_nmlinfo\_entry}), \textcolor{keywordtype}{pointer}:: hptr\_next =>null()
70     \textcolor{keywordtype}{character(TOKEN)}, \textcolor{keywordtype}{pointer}:: varnames\_array(:) =>null()
71     \textcolor{keywordtype}{integer}:: i, vnmax
72     \textcolor{keywordtype}{integer}:: stat
73     \textcolor{keywordtype}{character(STRING)}:: cause\_c
74     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{parameter}:: subname = \textcolor{stringliteral}{'HstNmlInfoDelete'}
75   \textcolor{keywordflow}{continue}
76     \textcolor{keyword}{call }beginsub( subname, &
77       & fmt = \textcolor{stringliteral}{'@name=%c'}, &
78       & c1 = trim( name ) )
79     stat = \hyperlink{namespacedc__error_a64841a3c9e3ef7d5ddb175e5770f7dfe}{dc\_noerr}
80     cause\_c = \textcolor{stringliteral}{''}
81 
82     \textcolor{comment}{!-----------------------------------------------------------------}
83     \textcolor{comment}{!  初期設定のチェック}
84     \textcolor{comment}{!  Check initialization}
85     \textcolor{comment}{!-----------------------------------------------------------------}
86     \textcolor{keywordflow}{if} ( .not. gthstnml % initialized ) \textcolor{keywordflow}{then}
87       stat = \hyperlink{namespacedc__error_a31f1081213c338a4f6a6e5acdfe4a8a8}{dc\_enotinit}
88       cause\_c = \textcolor{stringliteral}{'GTHST\_NMLINFO'}
89       \textcolor{keywordflow}{goto} 999
90 \textcolor{keywordflow}{    end if}
91 
92     \textcolor{keywordflow}{if} ( .not. gthstnml % define\_mode ) \textcolor{keywordflow}{then}
93       stat = \hyperlink{namespacedc__error_ad13dd9239cf193ea3a029747ece73c50}{hst\_enotindefine}
94       cause\_c = \textcolor{stringliteral}{'Delete'}
95       \textcolor{keywordflow}{goto} 999
96 \textcolor{keywordflow}{    end if}
97 
98     \textcolor{comment}{!-----------------------------------------------------------------}
99     \textcolor{comment}{!  複数の変数を削除する場合}
100     \textcolor{comment}{!  Delete multiple variables}
101     \textcolor{comment}{!-----------------------------------------------------------------}
102     \textcolor{keywordflow}{if} ( present\_and\_not\_empty(name) ) \textcolor{keywordflow}{then}
103       \textcolor{keywordflow}{if} ( index(name, \hyperlink{namespacegtool__history__nmlinfo__internal_a70f5d905a8fb6970a88cf6bf122ab858}{name\_delimiter}) > 0 ) \textcolor{keywordflow}{then}
104         \textcolor{keyword}{call }dbgmessage( \textcolor{stringliteral}{'multiple entries (%c) will be deleted'}, c1 = trim(name) )
105         \textcolor{keyword}{call }split( str = name, sep = \hyperlink{namespacegtool__history__nmlinfo__internal_a70f5d905a8fb6970a88cf6bf122ab858}{name\_delimiter}, & \textcolor{comment}{! (in)}
106           & carray = varnames\_array )                   \textcolor{comment}{! (out)}
107         vnmax = \textcolor{keyword}{size}( varnames\_array )
108 
109         \textcolor{keywordflow}{do} i = 1, vnmax
110           \textcolor{keyword}{call }\hyperlink{interfacegtool__history__nmlinfo__generic_1_1hstnmlinfodelete}{hstnmlinfodelete}( &
111             & gthstnml = gthstnml, &      \textcolor{comment}{! (inout)}
112             & name = varnames\_array(i), & \textcolor{comment}{! (in)}
113             & err = err )                 \textcolor{comment}{! (out)}
114           \textcolor{keywordflow}{if} ( present\_and\_true( err ) ) \textcolor{keywordflow}{then}
115             \textcolor{keyword}{deallocate}( varnames\_array )
116             stat = \hyperlink{namespacedc__error_a06cf52d1f5684d6d92f7e92c2c1fd43a}{usr\_errno}
117             \textcolor{keywordflow}{goto} 999
118 \textcolor{keywordflow}{          end if}
119 \textcolor{keywordflow}{        end do}
120         \textcolor{keyword}{deallocate}( varnames\_array )
121         \textcolor{keywordflow}{goto} 999
122 \textcolor{keywordflow}{      end if}
123 \textcolor{keywordflow}{    end if}
124 
125     \textcolor{comment}{!-----------------------------------------------------------------}
126     \textcolor{comment}{!  *gthstnml* の情報を削除.}
127     \textcolor{comment}{!  Delete information in *gthstnml*}
128     \textcolor{comment}{!-----------------------------------------------------------------}
129     hptr => gthstnml % gthstnml\_list
130     \textcolor{keyword}{call }listsearch( gthstnml\_list = hptr, & \textcolor{comment}{! (inout)}
131       &              name = name, &          \textcolor{comment}{! (in)}
132       &              previous = hptr\_prev, & \textcolor{comment}{! (out)}
133       &              next = hptr\_next )      \textcolor{comment}{! (out)}
134 
135     \textcolor{keywordflow}{if} ( .not. \textcolor{keyword}{associated}( hptr ) ) \textcolor{keywordflow}{goto} 999
136     \textcolor{keywordflow}{if} ( ( trim(hptr % name) /= \textcolor{stringliteral}{''} ) .and. \textcolor{keyword}{associated}( hptr\_prev ) ) \textcolor{keywordflow}{then}
137       \textcolor{keyword}{call }dbgmessage( \textcolor{stringliteral}{'entry (%c) is deleted'}, c1 = trim( adjustl( name ) ) )
138       hptr\_prev % next => hptr\_next
139       \textcolor{keyword}{deallocate}( hptr )
140 \textcolor{keywordflow}{    end if}
141 
142     \textcolor{comment}{!-----------------------------------------------------------------}
143     \textcolor{comment}{!  終了処理, 例外処理}
144     \textcolor{comment}{!  Termination and Exception handling}
145     \textcolor{comment}{!-----------------------------------------------------------------}
146 999 \textcolor{keywordflow}{continue}
147     \textcolor{keyword}{call }\hyperlink{namespacedc__error_a0104aee83ee5752b1a9f6152b11864a8}{storeerror}( stat, subname, err, cause\_c )
148     \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]{hstnmlinfodelete_8f90_a91b817be59c5a3451a7dbd12c1503f5c_cgraph}
\end{center}
\end{figure}
