\hypertarget{class_qore_1_1zzz8valuezzz9}{}\doxysection{Qore\+::zzz8valuezzz9 Class Reference}
\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 \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}); this is the root class for all pseudo-\/classes.  




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}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3bd7145235f0f4160b29e9ff1a925f4f}{callp}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_False}{False}}; this method is reimplemented in other types and will return \mbox{\hyperlink{basic_data_types_True}{True}} if the given expression is a callable value (ie \mbox{\hyperlink{expressions_closure}{closures}} or \mbox{\hyperlink{expressions_call_reference}{call references}}) \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{complex\+Type}} ()
\begin{DoxyCompactList}\small\item\em returns \mbox{\hyperlink{basic_data_types_True}{True}} if the value has a complex type, \mbox{\hyperlink{basic_data_types_False}{False}} if not \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_aa89ad8b046cb41c3588b75e07426696c}{empty}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}}; this method will be reimplemented in container types where it may return \mbox{\hyperlink{basic_data_types_False}{False}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{full\+Type}} (\+\_\+\+\_\+7\+\_\+ bool 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 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{intp}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_False}{False}}; this method is reimplemented in other types and will return \mbox{\hyperlink{basic_data_types_True}{True}} 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 \mbox{\hyperlink{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 \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} 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 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_aefcaa86868b4993dd5b0f91fa7b5c1ad}{sizep}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the type can return a non-\/zero size (\mbox{\hyperlink{basic_data_types_True}{True}} for containers including \mbox{\hyperlink{basic_data_types_binary}{binary objects}} and \mbox{\hyperlink{basic_data_types_string}{strings}}, \mbox{\hyperlink{basic_data_types_False}{False}} for everything else) \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_af066cf20f6d6a860d209acc7e9e40c20}{strp}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_False}{False}}; this method is reimplemented in other types and will return \mbox{\hyperlink{basic_data_types_True}{True}} if the given expression can be converted to a string. \end{DoxyCompactList}\item 
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 \mbox{\hyperlink{basic_data_types_False}{False}}. \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_a073b50bf1e4e7b646da0d7a6db6180a8}{to\+String}} ()
\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 
bool \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{val}} ()
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_False}{False}}; this method is reimplemented in other types and will return \mbox{\hyperlink{basic_data_types_True}{True}} 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 \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}}); this is the root class for all pseudo-\/classes. 

\doxysubsection{Member Function Documentation}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::callp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

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

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

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::complex\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

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

\end{DoxyCode}

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

\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::empty (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

This pseudo-\/method will return \mbox{\hyperlink{basic_data_types_False}{False}} in all non-\/container types; use \mbox{\hyperlink{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}
\mbox{\hyperlink{basic_data_types_True}{True}}; this method will be reimplemented in container types where it may return \mbox{\hyperlink{basic_data_types_False}{False}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int i = 100;}
\DoxyCodeLine{\textcolor{keywordflow}{if} (i.empty())}
\DoxyCodeLine{    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{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}
\mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{Qore\+::zzz8valuezzz9\+::val()}} 
\end{DoxySeeAlso}
\mbox{\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[{\+\_\+\+\_\+7\+\_\+ 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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\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 \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}}
\end{DoxyReturn}
Complex types are\+:
\begin{DoxyItemize}
\item \mbox{\hyperlink{data_type_declarations_hash_hashdecl_type}{hashdecl hashes}}\+: the complex type description is returned (ex\+: {\ttfamily \char`\"{}hash$<$\+My\+Hash$>$\char`\"{}})
\item \mbox{\hyperlink{data_type_declarations_hash_complex_type}{complex hashes}}\+: the complex type description is returned (ex\+: {\ttfamily \char`\"{}hash$<$string, int$>$\char`\"{}})
\item \mbox{\hyperlink{data_type_declarations_list_complex_type}{complex lists}}\+: the complex type description is returned (ex\+: {\ttfamily \char`\"{}list$<$int$>$\char`\"{}})
\item \mbox{\hyperlink{data_type_declarations_object_type}{objects}}\+: the complex type description is returned (ex\+: {\ttfamily \char`\"{}object$<$\+My\+Class$>$\char`\"{}}; see \mbox{\hyperlink{data_type_declarations_object_complex_type}{Class-\/\+Specific Type Declaration}})
\end{DoxyItemize}

\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{Qore\+::zzz8valuezzz9\+::complex\+Type()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}}
\item \mbox{\hyperlink{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}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::intp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

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

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

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1zzz8stringzzz9_ace7f5b6ac2e7b9f4886c9e153edd46d7}{Qore\+::zzz8stringzzz9\+::intp()}} for an example of an implementation of this method where the result depends on the value and not the \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{type}} 
\end{DoxySeeAlso}
\mbox{\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 \mbox{\hyperlink{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 \mbox{\hyperlink{class_qore_1_1_single_value_iterator}{Single\+Value\+Iterator}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

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

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\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 \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} 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 \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} 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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{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}
\mbox{\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 \mbox{\hyperlink{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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int i = 100;}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!i.size())}
\DoxyCodeLine{    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{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 \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06}{Qore\+::zzz8valuezzz9\+::size()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{Qore\+::zzz8valuezzz9\+::val()}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::sizep (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the type can return a non-\/zero size (\mbox{\hyperlink{basic_data_types_True}{True}} for containers including \mbox{\hyperlink{basic_data_types_binary}{binary objects}} and \mbox{\hyperlink{basic_data_types_string}{strings}}, \mbox{\hyperlink{basic_data_types_False}{False}} for everything else)
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a794caed9de093e89d88bfbe652e15a06}{Qore\+::zzz8valuezzz9\+::size()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9 
\end{DoxySince}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::strp (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

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

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

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::to\+Bool (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the boolean representation of the value; the default is \mbox{\hyperlink{basic_data_types_False}{False}}. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the boolean representation of the value; the default is \mbox{\hyperlink{basic_data_types_False}{False}}
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()}} returns \mbox{\hyperlink{basic_data_types_True}{True}}, then the value can also be converted to a boolean value
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the floating-\/point representation of the value; the default is 0.\+0
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()}} returns \mbox{\hyperlink{basic_data_types_True}{True}}, then the value can also be converted to a floating-\/point value
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
Use \mbox{\hyperlink{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}
\mbox{\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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the integer representation of the value; the default is 0
\end{DoxyReturn}
\begin{DoxyNote}{Note}
if \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a6feb7fd9eae7eac19775a47db23ad4e5}{Qore\+::zzz8valuezzz9\+::intp()}} returns \mbox{\hyperlink{basic_data_types_True}{True}}, then the value can also be converted to an arbitrary-\/precision numeric value
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+8 
\end{DoxySince}
\mbox{\Hypertarget{class_qore_1_1zzz8valuezzz9_a073b50bf1e4e7b646da0d7a6db6180a8}\label{class_qore_1_1zzz8valuezzz9_a073b50bf1e4e7b646da0d7a6db6180a8}} 
\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}{ }\end{DoxyParamCaption})}



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

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
Use \mbox{\hyperlink{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
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 
\end{DoxySince}
\mbox{\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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\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 \mbox{\hyperlink{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 \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}} for comparing data types
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a5e7d381ab49abebd0d0f045708482512}{Qore\+::zzz8valuezzz9\+::type\+Code()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{Qore\+::zzz8valuezzz9\+::complex\+Type()}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\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\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{switch (v.typeCode()) \{}
\DoxyCodeLine{    case NT\_INT:}
\DoxyCodeLine{        \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"{}\%y: is an integer\(\backslash\)n"{}}, v);}
\DoxyCodeLine{        \textcolor{keywordflow}{break};}
\DoxyCodeLine{}
\DoxyCodeLine{    case NT\_DATE:}
\DoxyCodeLine{        \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"{}\%y: is a date\(\backslash\)n"{}}, v);}
\DoxyCodeLine{        \textcolor{keywordflow}{break};}
\DoxyCodeLine{}
\DoxyCodeLine{    default:}
\DoxyCodeLine{        \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{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 \mbox{\hyperlink{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 \mbox{\hyperlink{group__type__code__constants}{Type Code Constants}} for possible return values for each type
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a333453fca3889bfa8d4159b921b1ab87}{Qore\+::zzz8valuezzz9\+::type()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_abd777c781935cb8faf3381fcc7ef3e88}{Qore\+::zzz8valuezzz9\+::full\+Type()}}
\item \mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3ef4fe2f9389f29e7c53e2cfc4217a97}{Qore\+::zzz8valuezzz9\+::complex\+Type()}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\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 bool Qore\+::zzz8valuezzz9\+::val (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

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

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (n.val())}
\DoxyCodeLine{    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{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}
\mbox{\hyperlink{data_type_declarations_int_type}{int}}, \mbox{\hyperlink{data_type_declarations_float_type}{float}}, \mbox{\hyperlink{data_type_declarations_number_type}{number}} &\mbox{\hyperlink{basic_data_types_False}{False}} if zero, \mbox{\hyperlink{basic_data_types_True}{True}} if non-\/zero  \\\cline{1-2}
\mbox{\hyperlink{data_type_declarations_string_type}{string}} &\mbox{\hyperlink{basic_data_types_False}{False}} if empty, \mbox{\hyperlink{basic_data_types_True}{True}} if not empty  \\\cline{1-2}
\mbox{\hyperlink{data_type_declarations_list_type}{list}} &\mbox{\hyperlink{basic_data_types_False}{False}} if empty, \mbox{\hyperlink{basic_data_types_True}{True}} if not empty  \\\cline{1-2}
\mbox{\hyperlink{data_type_declarations_hash_type}{hash}} &\mbox{\hyperlink{basic_data_types_False}{False}} if empty, \mbox{\hyperlink{basic_data_types_True}{True}} if not empty  \\\cline{1-2}
\mbox{\hyperlink{data_type_declarations_object_type}{object}} &always \mbox{\hyperlink{basic_data_types_True}{True}} with a valid object  \\\cline{1-2}
\mbox{\hyperlink{data_type_declarations_code_type}{code}} &always \mbox{\hyperlink{basic_data_types_True}{True}}  \\\cline{1-2}
\mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} &always \mbox{\hyperlink{basic_data_types_False}{False}}  \\\cline{1-2}
\mbox{\hyperlink{basic_data_types_null}{NULL}} &always \mbox{\hyperlink{basic_data_types_False}{False}}  \\\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}
 &\mbox{\hyperlink{basic_data_types_False}{False}}  \\\cline{1-2}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\begin{DoxyItemize}
\item Use \mbox{\hyperlink{operators_exists}{Exists Operator (exists)}} 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 \mbox{\hyperlink{parse_directives_strict-bool-eval}{\%strict-\/bool-\/eval}} 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 \mbox{\hyperlink{parse_directives_perl-bool-eval}{\%perl-\/bool-\/eval}} is enabled (the default); note that {\ttfamily \char`\"{}0\char`\"{}.\mbox{\hyperlink{class_qore_1_1zzz8valuezzz9_a3a66486cee14aa073cf90fbed5a23edd}{val()}}} returns \mbox{\hyperlink{basic_data_types_True}{True}} while {\ttfamily boolean(\char`\"{}0\char`\"{})} returns \mbox{\hyperlink{basic_data_types_False}{False}} in all cases.
\end{DoxyItemize}
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

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