\hypertarget{gdmemvarattrtrue_8f90}{}\section{gtdata/gtdata\+\_\+memory/gdmemvarattrtrue.f90 File Reference}
\label{gdmemvarattrtrue_8f90}\index{gtdata/gtdata\+\_\+memory/gdmemvarattrtrue.\+f90@{gtdata/gtdata\+\_\+memory/gdmemvarattrtrue.\+f90}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
logical function \hyperlink{gdmemvarattrtrue_8f90_a90e279100442586c3919c71f68ac4d63}{gdmemvarattrtrue} (var, name, default)
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{gdmemvarattrtrue_8f90_a90e279100442586c3919c71f68ac4d63}\label{gdmemvarattrtrue_8f90_a90e279100442586c3919c71f68ac4d63}} 
\index{gdmemvarattrtrue.\+f90@{gdmemvarattrtrue.\+f90}!gdmemvarattrtrue@{gdmemvarattrtrue}}
\index{gdmemvarattrtrue@{gdmemvarattrtrue}!gdmemvarattrtrue.\+f90@{gdmemvarattrtrue.\+f90}}
\subsubsection{\texorpdfstring{gdmemvarattrtrue()}{gdmemvarattrtrue()}}
{\footnotesize\ttfamily logical function gdmemvarattrtrue (\begin{DoxyParamCaption}\item[{type(gd\+\_\+mem\+\_\+variable), intent(in)}]{var,  }\item[{character(len = $\ast$), intent(in)}]{name,  }\item[{logical, intent(in), optional}]{default }\end{DoxyParamCaption})}



Definition at line 2 of file gdmemvarattrtrue.\+f90.


\begin{DoxyCode}
2   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__memory__types}{gtdata\_memory\_types}\textcolor{keywordtype}{, only}: \hyperlink{structgtdata__memory__types_1_1gd__mem__variable}{gd\_mem\_variable}, 
      \hyperlink{structgtdata__memory__types_1_1gd__mem__variable__entry}{gd\_mem\_variable\_entry}, \hyperlink{structgtdata__memory__types_1_1gd__mem__attr__chain}{gd\_mem\_attr\_chain}
3   \textcolor{keywordtype}{use }\hyperlink{namespacegtdata__memory__internal}{gtdata\_memory\_internal}\textcolor{keywordtype}{, only}: \hyperlink{interfacegtdata__memory__internal_1_1memtab__lookup}{memtab\_lookup}
4   \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1str__to__logical}{str\_to\_logical}
5   \textcolor{keywordtype}{use }netcdf\textcolor{keywordtype}{, only}: nf90\_noerr
6   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__memory__types_1_1gd__mem__variable}{gd\_mem\_variable}), \textcolor{keywordtype}{intent(in)}:: var
7   \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: name
8   \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional}:: default
9   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__memory__types_1_1gd__mem__variable__entry}{gd\_mem\_variable\_entry}), \textcolor{keywordtype}{pointer}:: ent
10   \textcolor{keywordtype}{type}(\hyperlink{structgtdata__memory__types_1_1gd__mem__attr__chain}{gd\_mem\_attr\_chain}), \textcolor{keywordtype}{pointer}:: p
11   \textcolor{keywordtype}{character(10)}:: s
12   \textcolor{keywordtype}{integer}:: stat, i
13 
14   stat = \hyperlink{interfacegtdata__memory__internal_1_1memtab__lookup}{memtab\_lookup}(var, ent)
15   \textcolor{keywordflow}{if} (stat /= nf90\_noerr) \textcolor{keywordflow}{goto} 999
16   p => ent%attr
17   \textcolor{keywordflow}{do}
18     \textcolor{keywordflow}{if} (.not. \textcolor{keyword}{associated}(p)) \textcolor{keywordflow}{exit}
19     \textcolor{keywordflow}{if} (p%name == name) \textcolor{keywordflow}{then}
20       \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(p%cbuf)) \textcolor{keywordflow}{then}
21         s = \textcolor{stringliteral}{""}
22         \textcolor{keywordflow}{do}, i = 1, \hyperlink{interfacedc__date__generic_1_1min}{min}(len(s), \textcolor{keyword}{size}(p%cbuf))
23           s(i:i) = p%cbuf(i)
24 \textcolor{keywordflow}{        enddo}
25         result = \hyperlink{interfacedc__string_1_1str__to__logical}{str\_to\_logical}(s)
26       \textcolor{keywordflow}{else}
27         \textcolor{keywordflow}{exit}
28 \textcolor{keywordflow}{      endif}
29       \textcolor{keywordflow}{return}
30 \textcolor{keywordflow}{    endif}
31     p => p%next
32 \textcolor{keywordflow}{  enddo}
33 999 \textcolor{keywordflow}{continue}
34   result = .false.
35   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(default)) result = default
36   \textcolor{keywordflow}{return}
\end{DoxyCode}
