\hypertarget{interfacedc__hash_1_1dchashdelete}{}\section{dc\+\_\+hash\+:\+:dchashdelete Interface Reference}
\label{interfacedc__hash_1_1dchashdelete}\index{dc\+\_\+hash\+::dchashdelete@{dc\+\_\+hash\+::dchashdelete}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacedc__hash_1_1dchashdelete_a1efad53fa42477b4f08ad99cbd93a12f}{dchashdelete0} (hashv, key)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


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



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



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


\begin{DoxyCode}
362     \textcolor{comment}{!}
363     \textcolor{comment}{! *hashv* のキー *key* およびその関連する値を削除します.}
364     \textcolor{comment}{! *hashv* 内に *key* が見つからない場合には何もしません.}
365     \textcolor{comment}{!}
366     \textcolor{comment}{! *key* が省略される場合には *hashv* 内の全てのキーと値を}
367     \textcolor{comment}{! 削除します.}
368     \textcolor{comment}{!}
369     \textcolor{keywordtype}{implicit none}
370     \textcolor{keywordtype}{type}(\hyperlink{structdc__hash_1_1hash}{hash}), \textcolor{keywordtype}{intent(inout)} :: hashv
371     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: key
372     \textcolor{keywordtype}{type}(\hyperlink{structdc__hash_1_1hash__internal}{hash\_internal}), \textcolor{keywordtype}{pointer} :: hash\_table\_tmp(:) => null()
373     \textcolor{keywordtype}{integer} :: table\_size, i, j
374     \textcolor{keywordtype}{logical} :: found
375     \textcolor{keywordtype}{character(STRING)} :: search\_value
376   \textcolor{keywordflow}{continue}
377     \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(key)) \textcolor{keywordflow}{then}
378       \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashget}{dchashget}(hashv, key, search\_value, found)
379       table\_size = \hyperlink{interfacedc__hash_1_1dchashnumber}{dchashnumber}(hashv)
380       \textcolor{keywordflow}{if} (found .and. table\_size > 1) \textcolor{keywordflow}{then}
381         \textcolor{keyword}{allocate}(hash\_table\_tmp(table\_size))
382         hash\_table\_tmp = hashv % hash\_table
383         \textcolor{keyword}{deallocate}(hashv % hash\_table)
384         \textcolor{keyword}{allocate}(hashv % hash\_table(table\_size - 1))
385         j = 1
386         \textcolor{keywordflow}{do} i = 1, table\_size
387           \textcolor{keywordflow}{if} (trim(hash\_table\_tmp(i) % key) /= trim(key)) \textcolor{keywordflow}{then}
388             hashv % hash\_table(j) % key = hash\_table\_tmp(i) % key
389             hashv % hash\_table(j) % value = hash\_table\_tmp(i) % value
390             j = j + 1
391 \textcolor{keywordflow}{          end if}
392 \textcolor{keywordflow}{        end do}
393         
394         \textcolor{keyword}{deallocate}(hash\_table\_tmp)
395       \textcolor{keywordflow}{elseif} (found .and. table\_size == 1) \textcolor{keywordflow}{then}
396         \textcolor{keyword}{deallocate}(hashv % hash\_table)
397 \textcolor{keywordflow}{      end if}
398     \textcolor{keywordflow}{else}
399       \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(hashv % hash\_table)) \textcolor{keyword}{deallocate}(hashv % hash\_table)
400 \textcolor{keywordflow}{    end if}
401 
\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}
