\doxysection{Qore\+::zzz8valuezzz9 Class Reference}
\hypertarget{class_qore_1_1zzz8valuezzz9}{}\label{class_qore_1_1zzz8valuezzz9}\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}


Methods in this pseudo-\/class are available to be executed on any value type (even \doxysectlink{basic_data_types_nothing}{NOTHING}{1}); this is the root class for all pseudo-\/classes.  




{\ttfamily \#include $<$Pseudo\+\_\+\+QC\+\_\+\+All.\+dox.\+h$>$}



Inheritance diagram for Qore\+::zzz8valuezzz9\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_qore_1_1zzz8valuezzz9__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3bd7145235f0f4160b29e9ff1a925f4f}{callp}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression is a callable value (ie \doxysectlink{expressions_closure}{closures}{1} or \doxysectlink{expressions_call_reference}{call references}{1}) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{complex\+Type}} ()
\begin{DoxyCompactList}\small\item\em returns \doxysectlink{basic_data_types_True}{True}{2} if the value has a complex type, \doxysectlink{basic_data_types_False}{False}{2} if not \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_aa89ad8b046cb41c3588b75e07426696c}{empty}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_True}{True}{2}; this method will be reimplemented in container types where it may return \doxysectlink{basic_data_types_False}{False}{2}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{full\+Type}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{with\+\_\+namespaces}})
\begin{DoxyCompactList}\small\item\em returns the full type name which differs from the simple type name in case of complex types and objects \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{intp}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression can be converted to an integer. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_abstract_iterator}{Abstract\+Iterator}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a16b7eeea1bb08b7c3faa69b2aa602fbb}{iterator}} ()
\begin{DoxyCompactList}\small\item\em Returns an iterator object for the value; the default iterator object returned is \doxylink{class_qore_1_1_single_value_iterator}{Single\+Value\+Iterator}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a6088d2158ce94d0d6c9159a628f79017}{lsize}} ()
\begin{DoxyCompactList}\small\item\em Returns 1; the return value of this method should give the list size of the value, which is normally 1 for non-\/lists (except for \doxysectlink{basic_data_types_nothing}{NOTHING}{1} where the size will be 0) and the number of the elements in the list for lists; this method will be reimplemented in other types where it may return other values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06}{size}} ()
\begin{DoxyCompactList}\small\item\em Returns zero; this method will be reimplemented in container types where it may return a non-\/zero value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_aefcaa86868b4993dd5b0f91fa7b5c1ad}{sizep}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_True}{True}{2} if the type can return a non-\/zero size (\doxysectlink{basic_data_types_True}{True}{2} for containers including \doxysectlink{basic_data_types_binary}{binary objects}{1} and \doxysectlink{basic_data_types_string}{strings}{1}, \doxysectlink{basic_data_types_False}{False}{2} for everything else) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_af066cf20f6d6a860d209acc7e9e40c20}{strp}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression can be converted to a string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a671b4af222d6351eb969c2b1d710d463}{to\+Bool}} ()
\begin{DoxyCompactList}\small\item\em Returns the boolean representation of the value; the default is \doxysectlink{basic_data_types_False}{False}{2}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a11505ca76b6e168b1d143b3fc8d1ba60}{to\+Float}} ()
\begin{DoxyCompactList}\small\item\em Returns the floating-\/point representation of the value; the default is 0.\+0. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_aed0897423af7ddcb1ade7df4c4a61364}{to\+Int}} ()
\begin{DoxyCompactList}\small\item\em Returns the integer representation of the value; the default is 0. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_ad4bcbe12f38c710e0e7e67a68ab0512f}{to\+Number}} ()
\begin{DoxyCompactList}\small\item\em Returns the arbitrary-\/precision numeric representation of the value; the default is 0. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a82c78c7b10d754b7c528126eee07e286}{to\+String}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding)
\begin{DoxyCompactList}\small\item\em Returns the string representation of the value; the default is an empty string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{type}} ()
\begin{DoxyCompactList}\small\item\em Returns the string type for the value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{type\+Code}} ()
\begin{DoxyCompactList}\small\item\em Returns the type code for the value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{val}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression has a non-\/empty value. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Methods in this pseudo-\/class are available to be executed on any value type (even \doxysectlink{basic_data_types_nothing}{NOTHING}{1}); this is the root class for all pseudo-\/classes. 

\doxysubsection{Member Function Documentation}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a3bd7145235f0f4160b29e9ff1a925f4f}\label{class_qore_1_1zzz8valuezzz9_a3bd7145235f0f4160b29e9ff1a925f4f} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!callp@{callp}}
\index{callp@{callp}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{callp()}{callp()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::callp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression is a callable value (ie \doxysectlink{expressions_closure}{closures}{1} or \doxysectlink{expressions_call_reference}{call references}{1}) 

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression is a callable value (ie \doxysectlink{expressions_closure}{closures}{1} or \doxysectlink{expressions_call_reference}{call references}{1})
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (n.callp())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}the\ reuslt\ of\ calling\ the\ value:\ \%y\(\backslash\)n"{}},\ n());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}\label{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!complexType@{complexType}}
\index{complexType@{complexType}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{complexType()}{complexType()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::complex\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns \doxysectlink{basic_data_types_True}{True}{2} if the value has a complex type, \doxysectlink{basic_data_types_False}{False}{2} if not 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool\ b\ =\ n.complexType();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_True}{True}{2} if the value has a complex type, \doxysectlink{basic_data_types_False}{False}{2} if not; if this pseudo-\/method returns \doxysectlink{basic_data_types_True}{True}{2}, then the return value of \doxylink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()} will differ from that of \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}
\end{DoxyReturn}
Complex types are\+:
\begin{DoxyItemize}
\item \doxysectlink{data_type_declarations_hash_hashdecl_type}{Type-\/\+Safe Hash Type}{2}
\item \doxysectlink{data_type_declarations_hash_complex_type}{Hash With Declared Value Type}{2}
\item \doxysectlink{data_type_declarations_list_complex_type}{List With Declared Value Type}{2}
\item \doxysectlink{data_type_declarations_object_type}{objects}{1}
\end{DoxyItemize}

\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_aa89ad8b046cb41c3588b75e07426696c}\label{class_qore_1_1zzz8valuezzz9_aa89ad8b046cb41c3588b75e07426696c} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!empty@{empty}}
\index{empty@{empty}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{empty()}{empty()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::empty (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_True}{True}{2}; this method will be reimplemented in container types where it may return \doxysectlink{basic_data_types_False}{False}{2}. 

This pseudo-\/method will return \doxysectlink{basic_data_types_False}{False}{2} in all non-\/container types; use \doxylink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{Qore\+::zzz8valuezzz9\+::val()} to check if a generic expression that might not be a container type has a value instead.

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_True}{True}{2}; this method will be reimplemented in container types where it may return \doxysectlink{basic_data_types_False}{False}{2}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int\ i\ =\ 100;}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (i.empty())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ is\ empty\ (probably\ because\ it's\ a\ value\ of\ type\ \%y)\(\backslash\)n"{}},\ i,\ i.type());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{Qore\+::zzz8valuezzz9\+::val()} 
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}\label{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!fullType@{fullType}}
\index{fullType@{fullType}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{fullType()}{fullType()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::zzz8valuezzz9\+::full\+Type (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}}}]{with\+\_\+namespaces }\end{DoxyParamCaption})}



returns the full type name which differs from the simple type name in case of complex types and objects 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash\ <string,\ int>\ h();}
\DoxyCodeLine{\textcolor{comment}{\#\ returns\ "{}hash<string,\ int>"{}}}
\DoxyCodeLine{string\ str\ =\ n.fullType();}
\DoxyCodeLine{Mutex\ m();}
\DoxyCodeLine{\textcolor{comment}{\#\ returns\ "{}object<Mutex>"{}}}
\DoxyCodeLine{str\ =\ m.fullType();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the full type name which differs from the simple type name in case of complex types and objects; for simple types the return value is the same as for \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}
\end{DoxyReturn}
Complex types are\+:
\begin{DoxyItemize}
\item \doxysectlink{data_type_declarations_hash_hashdecl_type}{hashdecl hashes}{2}\+: the complex type description is returned (ex\+: {\ttfamily "{}hash$<$\+My\+Hash$>$"{}})
\item \doxysectlink{data_type_declarations_hash_complex_type}{complex hashes}{2}\+: the complex type description is returned (ex\+: {\ttfamily "{}hash$<$string, int$>$"{}})
\item \doxysectlink{data_type_declarations_list_complex_type}{complex lists}{2}\+: the complex type description is returned (ex\+: {\ttfamily "{}list$<$int$>$"{}})
\item \doxysectlink{data_type_declarations_object_type}{objects}{1}\+: the complex type description is returned (ex\+: {\ttfamily "{}object$<$\+My\+Class$>$"{}}; see \doxysectlink{data_type_declarations_object_complex_type}{Class-\/\+Specific Type Declaration}{2})
\end{DoxyItemize}

\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{Qore\+::zzz8valuezzz9\+::complex\+Type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}

\begin{DoxyItemize}
\item Qore 0.\+8.\+13
\item Qore 1.\+0 added the {\itshape with\+\_\+namespaces} argument 
\end{DoxyItemize}
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}\label{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!intp@{intp}}
\index{intp@{intp}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{intp()}{intp()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::intp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression can be converted to an integer. 

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression can be converted to an integer
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (n.intp())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ can\ be\ converted\ to\ an\ integer:\ \%d\(\backslash\)n"{}},\ n,\ int(n));}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1zzz8stringzzz9_ace7f5b6ac2e7b9f4886c9e153edd46d7}{Qore\+::zzz8stringzzz9\+::intp()} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{for} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{an} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{example} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{of} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{an} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{implementation} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{of} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{this} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{method} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{where} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{the} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{result} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{depends} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{on} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{the} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{value} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{and} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{not} \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{the} \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{type} 
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a16b7eeea1bb08b7c3faa69b2aa602fbb}\label{class_qore_1_1zzz8valuezzz9_a16b7eeea1bb08b7c3faa69b2aa602fbb} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!iterator@{iterator}}
\index{iterator@{iterator}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{iterator()}{iterator()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_qore_1_1_abstract_iterator}{Abstract\+Iterator}} Qore\+::zzz8valuezzz9\+::iterator (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns an iterator object for the value; the default iterator object returned is \doxylink{class_qore_1_1_single_value_iterator}{Single\+Value\+Iterator}. 

\begin{DoxyReturn}{Returns}
an iterator object for the value; the default iterator object returned is \doxylink{class_qore_1_1_single_value_iterator}{Single\+Value\+Iterator}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{map\ printf(\textcolor{stringliteral}{"{}+\ \%y\(\backslash\)n"{}},\ \$1),\ v.iterator();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a6088d2158ce94d0d6c9159a628f79017}\label{class_qore_1_1zzz8valuezzz9_a6088d2158ce94d0d6c9159a628f79017} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!lsize@{lsize}}
\index{lsize@{lsize}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{lsize()}{lsize()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::zzz8valuezzz9\+::lsize (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns 1; the return value of this method should give the list size of the value, which is normally 1 for non-\/lists (except for \doxysectlink{basic_data_types_nothing}{NOTHING}{1} where the size will be 0) and the number of the elements in the list for lists; this method will be reimplemented in other types where it may return other values. 

\begin{DoxyReturn}{Returns}
1; the return value of this method should give the list size of the value, which is normally 1 for non-\/lists (except for \doxysectlink{basic_data_types_nothing}{NOTHING}{1} where the size will be 0) and the number of the elements in the list for lists; this method will be reimplemented in other types where it may return other values
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}iterating\ \%d\ element\%s\(\backslash\)n"{}},\ val.lsize(),\ val.lsize()\ ==\ 1\ ?\ \textcolor{stringliteral}{"{}"{}}\ :\ \textcolor{stringliteral}{"{}s"{}});}
\DoxyCodeLine{foreach\ any\ element\ \textcolor{keywordflow}{in}\ (val)\ \{}
\DoxyCodeLine{\ \ \ \ do\_something(element);}
\DoxyCodeLine{\}}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06}\label{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!size@{size}}
\index{size@{size}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{size()}{size()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::zzz8valuezzz9\+::size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns zero; this method will be reimplemented in container types where it may return a non-\/zero value. 

This pseudo-\/method will return 0 in all non-\/container types; use \doxylink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{Qore\+::zzz8valuezzz9\+::val()} to check if a generic expression that might not be a container type has a value instead.

\begin{DoxyReturn}{Returns}
zero; this method will be reimplemented in container types where it may return a non-\/zero value
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int\ i\ =\ 100;}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (!i.size())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ has\ size\ 0\ (probably\ because\ it's\ a\ value\ of\ type\ \%y)\(\backslash\)n"{}},\ i,\ i.type());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06}{Qore\+::zzz8valuezzz9\+::size()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{Qore\+::zzz8valuezzz9\+::val()} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1zzz8valuezzz9_aefcaa86868b4993dd5b0f91fa7b5c1ad}\label{class_qore_1_1zzz8valuezzz9_aefcaa86868b4993dd5b0f91fa7b5c1ad} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!sizep@{sizep}}
\index{sizep@{sizep}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{sizep()}{sizep()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::sizep (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_True}{True}{2} if the type can return a non-\/zero size (\doxysectlink{basic_data_types_True}{True}{2} for containers including \doxysectlink{basic_data_types_binary}{binary objects}{1} and \doxysectlink{basic_data_types_string}{strings}{1}, \doxysectlink{basic_data_types_False}{False}{2} for everything else) 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_True}{True}{2} if the type can return a non-\/zero size (\doxysectlink{basic_data_types_True}{True}{2} for containers including \doxysectlink{basic_data_types_binary}{binary objects}{1} and \doxysectlink{basic_data_types_string}{strings}{1}, \doxysectlink{basic_data_types_False}{False}{2} for everything else)
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06}{Qore\+::zzz8valuezzz9\+::size()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_af066cf20f6d6a860d209acc7e9e40c20}\label{class_qore_1_1zzz8valuezzz9_af066cf20f6d6a860d209acc7e9e40c20} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!strp@{strp}}
\index{strp@{strp}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{strp()}{strp()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::strp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression can be converted to a string. 

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression can be converted to a string
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (n.strp())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ can\ be\ converted\ to\ a\ string:\ '\%s'\(\backslash\)n"{}},\ n,\ string(n));}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a671b4af222d6351eb969c2b1d710d463}\label{class_qore_1_1zzz8valuezzz9_a671b4af222d6351eb969c2b1d710d463} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!toBool@{toBool}}
\index{toBool@{toBool}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{toBool()}{toBool()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::to\+Bool (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the boolean representation of the value; the default is \doxysectlink{basic_data_types_False}{False}{2}. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the boolean representation of the value; the default is \doxysectlink{basic_data_types_False}{False}{2}
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if \doxylink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()} returns \doxysectlink{basic_data_types_True}{True}{2}, then the value can also be converted to a boolean value
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a11505ca76b6e168b1d143b3fc8d1ba60}\label{class_qore_1_1zzz8valuezzz9_a11505ca76b6e168b1d143b3fc8d1ba60} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!toFloat@{toFloat}}
\index{toFloat@{toFloat}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{toFloat()}{toFloat()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga113d18216af1bdb70545081b6a9892ef}{float}} Qore\+::zzz8valuezzz9\+::to\+Float (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the floating-\/point representation of the value; the default is 0.\+0. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the floating-\/point representation of the value; the default is 0.\+0
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if \doxylink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()} returns \doxysectlink{basic_data_types_True}{True}{2}, then the value can also be converted to a floating-\/point value
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_aed0897423af7ddcb1ade7df4c4a61364}\label{class_qore_1_1zzz8valuezzz9_aed0897423af7ddcb1ade7df4c4a61364} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!toInt@{toInt}}
\index{toInt@{toInt}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{toInt()}{toInt()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::zzz8valuezzz9\+::to\+Int (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the integer representation of the value; the default is 0. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
Use \doxylink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()} to determine if the current value can be converted to an integer

\begin{DoxyReturn}{Returns}
the integer representation of the value; the default is 0
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_ad4bcbe12f38c710e0e7e67a68ab0512f}\label{class_qore_1_1zzz8valuezzz9_ad4bcbe12f38c710e0e7e67a68ab0512f} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!toNumber@{toNumber}}
\index{toNumber@{toNumber}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{toNumber()}{toNumber()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} Qore\+::zzz8valuezzz9\+::to\+Number (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the arbitrary-\/precision numeric representation of the value; the default is 0. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the integer representation of the value; the default is 0
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if \doxylink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()} returns \doxysectlink{basic_data_types_True}{True}{2}, then the value can also be converted to an arbitrary-\/precision numeric value
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a82c78c7b10d754b7c528126eee07e286}\label{class_qore_1_1zzz8valuezzz9_a82c78c7b10d754b7c528126eee07e286} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!toString@{toString}}
\index{toString@{toString}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{toString()}{toString()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::zzz8valuezzz9\+::to\+String (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})}



Returns the string representation of the value; the default is an empty string. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
Use \doxylink{class_qore_1_1zzz8valuezzz9_af066cf20f6d6a860d209acc7e9e40c20}{Qore\+::zzz8valuezzz9\+::strp()} to determine if the current value can be converted to a string

\begin{DoxyReturn}{Returns}
the string representation of the value; the default is an empty string
\end{DoxyReturn}
\begin{DoxyNote}{Note}
check pseudo-\/classes for each type for other variants of this method; some may take arguments to affect the output format return false; 
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}\label{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!type@{type}}
\index{type@{type}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{type()}{type()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::zzz8valuezzz9\+::type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the string type for the value. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ t\ =\ n.type();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the string type for the value; see \doxylink{group__string__type__constants}{String Type Constants} for possible return values for each type
\end{DoxyReturn}
\begin{DoxyNote}{Note}
It is faster and more efficient to use \doxylink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()} for comparing data types
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{Qore\+::zzz8valuezzz9\+::complex\+Type()} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}\label{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!typeCode@{typeCode}}
\index{typeCode@{typeCode}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{typeCode()}{typeCode()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::zzz8valuezzz9\+::type\+Code (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the type code for the value. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{switch\ (v.typeCode())\ \{}
\DoxyCodeLine{\ \ \ \ case\ NT\_INT:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ is\ an\ integer\(\backslash\)n"{}},\ v);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ case\ NT\_DATE:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ is\ a\ date\(\backslash\)n"{}},\ v);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \ default:}
\DoxyCodeLine{\ \ \ \ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ is\ something\ else\ entirely\(\backslash\)n"{}},\ v);}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
This method is recommended over \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()} or the type(any) or typename(any) functions for comparing data types as it is much faster and more efficient than the other alternatives (which work with string values instead of integer codes).

\begin{DoxyReturn}{Returns}
the type code for the value; see \doxylink{group__type__code__constants}{Type Code Constants} for possible return values for each type
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}
\item \doxylink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{Qore\+::zzz8valuezzz9\+::complex\+Type()} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}\label{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd} 
\index{Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}!val@{val}}
\index{val@{val}!Qore::zzz8valuezzz9@{Qore::zzz8valuezzz9}}
\doxysubsubsection{\texorpdfstring{val()}{val()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::zzz8valuezzz9\+::val (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression has a non-\/empty value. 

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_False}{False}{2}; this method is reimplemented in other types and will return \doxysectlink{basic_data_types_True}{True}{2} if the given expression has a non-\/empty value
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (n.val())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}\%y:\ has\ a\ non-\/empty\ value\(\backslash\)n"{}},\ n);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyParagraph}{Rules\+:}
 \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
{\bfseries{Type}} &{\bfseries{Rule}}  \\\cline{1-2}
\doxysectlink{data_type_declarations_int_type}{int}{1}, \doxysectlink{data_type_declarations_float_type}{float}{1}, \doxysectlink{data_type_declarations_number_type}{number}{1} &\doxysectlink{basic_data_types_False}{False}{2} if zero, \doxysectlink{basic_data_types_True}{True}{2} if non-\/zero  \\\cline{1-2}
\doxysectlink{data_type_declarations_string_type}{string}{1} &\doxysectlink{basic_data_types_False}{False}{2} if empty, \doxysectlink{basic_data_types_True}{True}{2} if not empty  \\\cline{1-2}
\doxysectlink{data_type_declarations_list_type}{list}{1} &\doxysectlink{basic_data_types_False}{False}{2} if empty, \doxysectlink{basic_data_types_True}{True}{2} if not empty  \\\cline{1-2}
\doxysectlink{data_type_declarations_hash_type}{hash}{1} &\doxysectlink{basic_data_types_False}{False}{2} if empty, \doxysectlink{basic_data_types_True}{True}{2} if not empty  \\\cline{1-2}
\doxysectlink{data_type_declarations_object_type}{object}{1} &always \doxysectlink{basic_data_types_True}{True}{2} with a valid object  \\\cline{1-2}
\doxysectlink{data_type_declarations_code_type}{code}{1} &always \doxysectlink{basic_data_types_True}{True}{2}  \\\cline{1-2}
\doxysectlink{basic_data_types_nothing}{NOTHING}{1} &always \doxysectlink{basic_data_types_False}{False}{2}  \\\cline{1-2}
\doxysectlink{basic_data_types_null}{NULL}{1} &always \doxysectlink{basic_data_types_False}{False}{2}  \\\cline{1-2}
\end{longtabu}

\end{DoxyParagraph}
\begin{DoxyParagraph}{Example Values\+:}
 \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
{\bfseries{Example}} &{\bfseries{Result}}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{0.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_False}{False}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{1.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_True}{True}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{stringliteral}{"{}"{}}.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_False}{False}{2} (empty string)  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{stringliteral}{"{}0"{}}.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_True}{True}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{stringliteral}{"{}string"{}}.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_True}{True}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{().val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_False}{False}{2} (empty list)  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{(0,).val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_True}{True}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{\{\}.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_False}{False}{2} (empty hash)  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{(\textcolor{stringliteral}{"{}a"{}}:0).val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_True}{True}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{NOTHING.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_False}{False}{2}  \\\cline{1-2}

\begin{DoxyCode}{0}
\DoxyCodeLine{NULL.val()}

\end{DoxyCode}
 &\doxysectlink{basic_data_types_False}{False}{2}  \\\cline{1-2}
\end{longtabu}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item Use \doxysectlink{operators_exists}{Exists Operator (exists)}{2} to tell if an expression has a value or not
\item This pseudo-\/method can be used to mimic perl\textquotesingle{}s boolean evaluation when \doxysectlink{parse_directives_strict-bool-eval}{\%strict-\/bool-\/eval}{1} is enabled; the return value of this method is the same as that of any value except {\ttfamily "{}0"{}} when evaluated in a boolean context when \doxysectlink{parse_directives_perl-bool-eval}{\%perl-\/bool-\/eval}{1} is enabled (the default); note that {\ttfamily "{}0"{}.\doxylink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{val()}} returns \doxysectlink{basic_data_types_True}{True}{2} while {\ttfamily boolean("{}0"{})} returns \doxysectlink{basic_data_types_False}{False}{2} in all cases.
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxysectlink{parse_directives_perl-bool-eval}{\%perl-\/bool-\/eval}{1}
\item \doxysectlink{parse_directives_strict-bool-eval}{\%strict-\/bool-\/eval}{1} 
\end{DoxyItemize}
\end{DoxySeeAlso}
