\hypertarget{namespacedcunits__com}{}\section{dcunits\+\_\+com Module Reference}
\label{namespacedcunits__com}\index{dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespacedcunits__com_aa2be69c2ff217f412c58c1862bfba09e}{dcunitssetline} (line)
\item 
subroutine, public \hyperlink{namespacedcunits__com_aa146907b55342dd95b0c855734eba662}{dcunitsgettoken} (tokentype, ivalue, dvalue, cvalue)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a9ff9e3b80552927051cf2fe5a8927c25}{s\+\_\+eof} = -\/128
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a62bf20e71e6a99e72574e78f242ad2c4}{s\+\_\+shift} = 300
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a1a648fd6045bdb49ac21f9ee227a1558}{s\+\_\+text} = 301
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a41511b43fef56a230d8a529f123f1ee8}{s\+\_\+multiply} = 302
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_ac67d63de28b1fff7d472c511517bcd1e}{s\+\_\+divide} = 303
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_abb4406015d7a895bcc6e9e1b05b1edc5}{s\+\_\+exponent} = 304
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a5bb3ca8615865489dca1dcce878cc036}{s\+\_\+openpar} = 305
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a129d9cc679aa2bbbf4e79de4012351ec}{s\+\_\+closepar} = 306
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a020aa6b50721d81d1fe5aecc2c8a3dae}{s\+\_\+real} = 307
\item 
integer, parameter, public \hyperlink{namespacedcunits__com_a891255225975744c1d51a6922882c611}{s\+\_\+integer} = 308
\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacedcunits__com_aa146907b55342dd95b0c855734eba662}\label{namespacedcunits__com_aa146907b55342dd95b0c855734eba662}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!dcunitsgettoken@{dcunitsgettoken}}
\index{dcunitsgettoken@{dcunitsgettoken}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{dcunitsgettoken()}{dcunitsgettoken()}}
{\footnotesize\ttfamily subroutine, public dcunits\+\_\+com\+::dcunitsgettoken (\begin{DoxyParamCaption}\item[{integer, intent(out)}]{tokentype,  }\item[{integer, dimension(5), intent(out)}]{ivalue,  }\item[{real(dp), intent(out)}]{dvalue,  }\item[{character($\ast$), intent(out)}]{cvalue }\end{DoxyParamCaption})}



Definition at line 54 of file dcunits\+\_\+com.\+f90.



References dc\+\_\+regex\+::match(), s\+\_\+closepar, s\+\_\+divide, s\+\_\+eof, s\+\_\+exponent, s\+\_\+integer, s\+\_\+multiply, s\+\_\+openpar, s\+\_\+real, s\+\_\+shift, and s\+\_\+text.


\begin{DoxyCode}
54     \textcolor{keywordtype}{use }\hyperlink{namespacedc__regex}{dc\_regex}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}
55     \textcolor{keywordtype}{implicit none}
56     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: tokentype
57     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(out)}:: ivalue(5)
58     \textcolor{keywordtype}{real(DP)}, \textcolor{keywordtype}{intent(out)}:: dvalue
59     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(out)}:: cvalue
60     \textcolor{keywordtype}{integer}:: iend, istr, ilen, ios
61     ivalue = 0
62     dvalue = 0.0\_dp
63     cvalue = \textcolor{stringliteral}{""}
64     iend = len\_trim(thisline)
65     \textcolor{keywordflow}{do}
66       \textcolor{keywordflow}{if} (i > iend) \textcolor{keywordflow}{exit}
67       \textcolor{comment}{! '#' 文字が現われれば EOF シンボルを返す}
68       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^##"}, thisline(i:), istr, ilen)
69       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
70         i = iend + 1
71         tokentype = s\_eof
72         \textcolor{keywordflow}{return}
73 \textcolor{keywordflow}{      endif}
74       \textcolor{comment}{! 空白を無視}
75       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^#s+"}, thisline(i:), istr, ilen)
76       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
77         i = i + ilen
78         \textcolor{keywordflow}{if} (i > iend) \textcolor{keywordflow}{exit}
79 \textcolor{keywordflow}{      endif}
80       \textcolor{comment}{! シフト演算子チェック}
81       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^@"}, thisline(i:), istr, ilen)
82       \textcolor{keywordflow}{if} (istr <= 0) \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^from"}, thisline(i:), istr, ilen)
83       \textcolor{keywordflow}{if} (istr <= 0) \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^at"}, thisline(i:), istr, ilen)
84       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
85         i = i + ilen
86         tokentype = s\_shift
87         cvalue = thisline(i: i+ilen-1)
88         \textcolor{keywordflow}{return}
89 \textcolor{keywordflow}{      endif}
90       \textcolor{comment}{! 名前チェック}
91       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^#a#w*#a"}, thisline(i:), istr, ilen)
92       \textcolor{keywordflow}{if} (istr <= 0) \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^[#a'"}\textcolor{stringliteral}{"]"}, thisline(i:), istr, ilen)
93       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
94         tokentype = s\_text
95         cvalue = thisline(i: i+ilen-1)
96         i = i + ilen
97         \textcolor{keywordflow}{return}
98 \textcolor{keywordflow}{      endif}
99       \textcolor{comment}{! '*' の前に '**' を認知せねば。}
100       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^#^"}, thisline(i:), istr, ilen)
101       \textcolor{keywordflow}{if} (istr <= 0) \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^#*#*"}, thisline(i:), istr, ilen)
102       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
103         tokentype = s\_exponent
104         cvalue = thisline(i: i+ilen-1)
105         i = i + ilen
106         \textcolor{keywordflow}{return}
107 \textcolor{keywordflow}{      endif}
108       \textcolor{comment}{! 実数にならない小数点は S\_MULTIPLY}
109       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^#.[^#d]"}, thisline(i:), istr, ilen)
110       \textcolor{keywordflow}{if} (istr <= 0) \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^#*"}, thisline(i:), istr, ilen)
111       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
112         tokentype = s\_multiply
113         cvalue = thisline(i: i+ilen-1)
114         i = i + 1
115         \textcolor{keywordflow}{return}
116 \textcolor{keywordflow}{      endif}
117       \textcolor{comment}{! 実数チェック. 小数点は語頭にあれば必ず数字が伴うので安心せよ}
118       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^[-+]?#d*#.#d*[EeDd][-+]?#d+"}, thisline(i:), istr, ilen)
119       \textcolor{keywordflow}{if} (istr <= 0) \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^[-+]?#d*#.#d*"}, thisline(i:), istr, ilen)
120       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
121         \textcolor{keyword}{read}(thisline(i: i+ilen-1), fmt=*, &
122           & iostat=ios) dvalue
123         \textcolor{keywordflow}{if} (ios /= 0) dvalue = huge(dvalue)
124         cvalue = thisline(i: i+ilen-1)
125         tokentype = s\_real
126         i = i + ilen
127         \textcolor{keywordflow}{return}
128 \textcolor{keywordflow}{      endif}
129       \textcolor{comment}{! 整数チェック}
130       \textcolor{keyword}{call }\hyperlink{namespacedc__regex_abc5c6d1c941d8689bdf6e32a6b919b25}{match}(\textcolor{stringliteral}{"^[-+]?#d+"}, thisline(i:), istr, ilen)
131       \textcolor{keywordflow}{if} (istr > 0) \textcolor{keywordflow}{then}
132         \textcolor{keyword}{read}(thisline(i: i+ilen-1), fmt=*, &
133           & iostat=ios) ivalue(1)
134         \textcolor{keywordflow}{if} (ios /= 0) ivalue(1) = huge(1)
135         cvalue = thisline(i: i+ilen-1)
136         tokentype = s\_integer
137         i = i + ilen
138         \textcolor{keywordflow}{return}
139 \textcolor{keywordflow}{      endif}
140       \textcolor{comment}{! ほかの１字トークンチェック}
141       \textcolor{keywordflow}{if} (thisline(i:i) == \textcolor{stringliteral}{'/'}) \textcolor{keywordflow}{then}
142         tokentype = s\_divide
143         cvalue = thisline(i:i)
144         i = i + 1
145         \textcolor{keywordflow}{return}
146 \textcolor{keywordflow}{      endif}
147       \textcolor{keywordflow}{if} (thisline(i:i) == \textcolor{stringliteral}{'('}) \textcolor{keywordflow}{then}
148         tokentype = s\_openpar
149         cvalue = thisline(i:i)
150         i = i + 1
151         \textcolor{keywordflow}{return}
152 \textcolor{keywordflow}{      endif}
153       \textcolor{keywordflow}{if} (thisline(i:i) == \textcolor{stringliteral}{')'}) \textcolor{keywordflow}{then}
154         tokentype = s\_closepar
155         cvalue = thisline(i:i)
156         i = i + 1
157         \textcolor{keywordflow}{return}
158 \textcolor{keywordflow}{      endif}
159       \textcolor{comment}{! だめだこりゃ。はい次いってみよう}
160       tokentype = ichar(thisline(i:i))
161       cvalue = thisline(i:i)
162       i = i + 1
163       \textcolor{keywordflow}{return}
164 \textcolor{keywordflow}{    enddo}
165     i = iend + 1
166     tokentype = s\_eof
167     cvalue = \textcolor{stringliteral}{""}
\end{DoxyCode}
Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{namespacedcunits__com_aa146907b55342dd95b0c855734eba662_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{namespacedcunits__com_aa2be69c2ff217f412c58c1862bfba09e}\label{namespacedcunits__com_aa2be69c2ff217f412c58c1862bfba09e}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!dcunitssetline@{dcunitssetline}}
\index{dcunitssetline@{dcunitssetline}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{dcunitssetline()}{dcunitssetline()}}
{\footnotesize\ttfamily subroutine, public dcunits\+\_\+com\+::dcunitssetline (\begin{DoxyParamCaption}\item[{character($\ast$), intent(in)}]{line }\end{DoxyParamCaption})}



Definition at line 47 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
47     \textcolor{keywordtype}{implicit none}
48     \textcolor{keywordtype}{character(*)}, \textcolor{keywordtype}{intent(in)}:: line
49     thisline = line
50     i = 1
\end{DoxyCode}


\subsection{Variable Documentation}
\mbox{\Hypertarget{namespacedcunits__com_a129d9cc679aa2bbbf4e79de4012351ec}\label{namespacedcunits__com_a129d9cc679aa2bbbf4e79de4012351ec}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+closepar@{s\+\_\+closepar}}
\index{s\+\_\+closepar@{s\+\_\+closepar}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+closepar}{s\_closepar}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+closepar = 306}



Definition at line 36 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
36   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_closepar = 306
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_ac67d63de28b1fff7d472c511517bcd1e}\label{namespacedcunits__com_ac67d63de28b1fff7d472c511517bcd1e}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+divide@{s\+\_\+divide}}
\index{s\+\_\+divide@{s\+\_\+divide}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+divide}{s\_divide}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+divide = 303}



Definition at line 33 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
33   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_divide = 303
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a9ff9e3b80552927051cf2fe5a8927c25}\label{namespacedcunits__com_a9ff9e3b80552927051cf2fe5a8927c25}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+eof@{s\+\_\+eof}}
\index{s\+\_\+eof@{s\+\_\+eof}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+eof}{s\_eof}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+eof = -\/128}



Definition at line 29 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
29   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_eof = -128
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_abb4406015d7a895bcc6e9e1b05b1edc5}\label{namespacedcunits__com_abb4406015d7a895bcc6e9e1b05b1edc5}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+exponent@{s\+\_\+exponent}}
\index{s\+\_\+exponent@{s\+\_\+exponent}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+exponent}{s\_exponent}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+exponent = 304}



Definition at line 34 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
34   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_exponent = 304
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a891255225975744c1d51a6922882c611}\label{namespacedcunits__com_a891255225975744c1d51a6922882c611}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+integer@{s\+\_\+integer}}
\index{s\+\_\+integer@{s\+\_\+integer}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+integer}{s\_integer}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+integer = 308}



Definition at line 38 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
38   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_integer = 308
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a41511b43fef56a230d8a529f123f1ee8}\label{namespacedcunits__com_a41511b43fef56a230d8a529f123f1ee8}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+multiply@{s\+\_\+multiply}}
\index{s\+\_\+multiply@{s\+\_\+multiply}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+multiply}{s\_multiply}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+multiply = 302}



Definition at line 32 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
32   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_multiply = 302
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a5bb3ca8615865489dca1dcce878cc036}\label{namespacedcunits__com_a5bb3ca8615865489dca1dcce878cc036}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+openpar@{s\+\_\+openpar}}
\index{s\+\_\+openpar@{s\+\_\+openpar}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+openpar}{s\_openpar}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+openpar = 305}



Definition at line 35 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
35   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_openpar = 305
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a020aa6b50721d81d1fe5aecc2c8a3dae}\label{namespacedcunits__com_a020aa6b50721d81d1fe5aecc2c8a3dae}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+real@{s\+\_\+real}}
\index{s\+\_\+real@{s\+\_\+real}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+real}{s\_real}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+real = 307}



Definition at line 37 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
37   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_real = 307
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a62bf20e71e6a99e72574e78f242ad2c4}\label{namespacedcunits__com_a62bf20e71e6a99e72574e78f242ad2c4}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+shift@{s\+\_\+shift}}
\index{s\+\_\+shift@{s\+\_\+shift}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+shift}{s\_shift}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+shift = 300}



Definition at line 30 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
30   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_shift = 300
\end{DoxyCode}
\mbox{\Hypertarget{namespacedcunits__com_a1a648fd6045bdb49ac21f9ee227a1558}\label{namespacedcunits__com_a1a648fd6045bdb49ac21f9ee227a1558}} 
\index{dcunits\+\_\+com@{dcunits\+\_\+com}!s\+\_\+text@{s\+\_\+text}}
\index{s\+\_\+text@{s\+\_\+text}!dcunits\+\_\+com@{dcunits\+\_\+com}}
\subsubsection{\texorpdfstring{s\+\_\+text}{s\_text}}
{\footnotesize\ttfamily integer, parameter, public dcunits\+\_\+com\+::s\+\_\+text = 301}



Definition at line 31 of file dcunits\+\_\+com.\+f90.


\begin{DoxyCode}
31   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: s\_text = 301
\end{DoxyCode}
