\hypertarget{interfacedc__hash_1_1dchashput}{}\section{dc\+\_\+hash\+:\+:dchashput Interface Reference}
\label{interfacedc__hash_1_1dchashput}\index{dc\+\_\+hash\+::dchashput@{dc\+\_\+hash\+::dchashput}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacedc__hash_1_1dchashput_abfebb39c49449c978feb8548d7359114}{dchashput0} (hashv, key, value)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 119 of file dc\+\_\+hash.\+f90.



\subsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfacedc__hash_1_1dchashput_abfebb39c49449c978feb8548d7359114}\label{interfacedc__hash_1_1dchashput_abfebb39c49449c978feb8548d7359114}} 
\index{dc\+\_\+hash\+::dchashput@{dc\+\_\+hash\+::dchashput}!dchashput0@{dchashput0}}
\index{dchashput0@{dchashput0}!dc\+\_\+hash\+::dchashput@{dc\+\_\+hash\+::dchashput}}
\subsubsection{\texorpdfstring{dchashput0()}{dchashput0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+hash\+::dchashput\+::dchashput0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__hash_1_1hash}{hash}), intent(inout)}]{hashv,  }\item[{character($\ast$), intent(in)}]{key,  }\item[{character($\ast$), intent(in)}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 181 of file dc\+\_\+hash.\+f90.


\begin{DoxyCode}
181     \textcolor{comment}{!}
182     \textcolor{comment}{! *hashv* のキー *key* に値 *value* を関連付けます.}
183     \textcolor{comment}{!}
184     \textcolor{keywordtype}{implicit none}
185     \textcolor{keywordtype}{type}(\hyperlink{structdc__hash_1_1hash}{hash}), \textcolor{keywordtype}{intent(inout)} :: hashv
186     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)} :: key, value
187     \textcolor{keywordtype}{type}(\hyperlink{structdc__hash_1_1hash__internal}{hash\_internal}), \textcolor{keywordtype}{pointer} :: hash\_table\_tmp(:) => null()
188     \textcolor{keywordtype}{integer} :: table\_size, new\_index, i
189     \textcolor{keywordtype}{logical} :: found
190     \textcolor{keywordtype}{character(STRING)} :: search\_value
191   \textcolor{keywordflow}{continue}
192     \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashget}{dchashget}(hashv, key, search\_value, found)
193     \textcolor{keywordflow}{if} (.not. found) \textcolor{keywordflow}{then}
194       table\_size = \hyperlink{interfacedc__hash_1_1dchashnumber}{dchashnumber}(hashv)
195       \textcolor{keywordflow}{if} (table\_size > 0) \textcolor{keywordflow}{then}
196         \textcolor{keyword}{allocate}(hash\_table\_tmp(table\_size))
197         hash\_table\_tmp = hashv % hash\_table
198         \textcolor{keyword}{deallocate}(hashv % hash\_table)
199         \textcolor{keyword}{allocate}(hashv % hash\_table(table\_size + 1))
200         hashv % hash\_table(1:table\_size) = hash\_table\_tmp(1:table\_size)
201         \textcolor{keyword}{deallocate}(hash\_table\_tmp)
202         new\_index = table\_size + 1
203       \textcolor{keywordflow}{else}
204         \textcolor{keyword}{allocate}(hashv % hash\_table(1))
205         new\_index = 1
206 \textcolor{keywordflow}{      end if}
207 
208       hashv % hash\_table(new\_index) % key = key
209       hashv % hash\_table(new\_index) % value = \textcolor{keywordtype}{value}
210     \textcolor{keywordflow}{else}
211       \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(hashv % hash\_table)
212         \textcolor{keywordflow}{if} (trim(hashv % hash\_table(i) % key) == trim(key)) \textcolor{keywordflow}{then}
213           hashv % hash\_table(i) % value = \textcolor{keywordtype}{value}
214 \textcolor{keywordflow}{        end if}
215 \textcolor{keywordflow}{      end do}
216 \textcolor{keywordflow}{    end if}
217 
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
dc\+\_\+utils/\hyperlink{dc__hash_8f90}{dc\+\_\+hash.\+f90}\end{DoxyCompactItemize}
