\doxysection{Data Type Declarations and Restrictions}
\hypertarget{data_type_declarations}{}\label{data_type_declarations}\index{Data Type Declarations and Restrictions@{Data Type Declarations and Restrictions}}
Starting in Qore 0.\+8.\+0, it is possible to restrict variables, class members, and function and method parameters to certain data types. This allows programmers to write safer code, as many more errors can be caught at parse time that would otherwise be caught at run time. Furthermore, providing type information to the parser allows Qore to implement performance optimizations by performing lookups and resolutions once at parse time rather than every time a variable or class member is accessed at run time.

When types are declared in a parameter list, functions and methods can be overloaded as well.

The types in the following table can be used as well as any class name or {\ttfamily \textquotesingle{}\texorpdfstring{$\ast$}{*}classname\textquotesingle{}} (i.\+e. an asterix followed by the class name), meaning either the given class or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} (no value).

{\bfseries{Data Type Declaration Names}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
\doxysectlink{data_type_declarations_int_type}{int}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &Restricts values \doxysectlink{basic_data_types_integer}{Integer}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_float_type}{float}{1} &\doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_integer}{Integer}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Restricts values to \doxysectlink{basic_data_types_float}{Float}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_number_type}{number}{1} &\doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, or \doxysectlink{basic_data_types_integer}{Integer}{1} &\doxysectlink{basic_data_types_number}{Number}{1} &Restricts values to \doxysectlink{basic_data_types_number}{Number}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_bool_type}{bool}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} &Restricts values to \doxysectlink{basic_data_types_boolean}{Boolean}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_string_type}{string}{1} &\doxysectlink{basic_data_types_string}{String}{1} &\doxysectlink{basic_data_types_string}{String}{1} &Restricts values to \doxysectlink{basic_data_types_string}{String}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_date_type}{date}{1} &\doxysectlink{basic_data_types_date}{Date}{1} &\doxysectlink{basic_data_types_date}{Date}{1} &Restricts values to \doxysectlink{basic_data_types_date}{Date}{1} values; values may be either \doxysectlink{basic_data_types_absolute_dates}{absolute}{2} or \doxysectlink{basic_data_types_relative_dates}{relative}{2}  \\\cline{1-4}
\doxysectlink{data_type_declarations_binary_type}{binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} &Restricts values to \doxysectlink{basic_data_types_binary}{Binary}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_hash_type}{hash}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} &Restricts values to \doxysectlink{container_data_types_hash}{Hash}{1} values without any key type information  \\\cline{1-4}
\doxysectlink{data_type_declarations_hash_hashdecl_type}{hash\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &\doxysectlink{container_data_types_hash}{Hash}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} &Restricts values to values of the referenced \doxylink{hashdecl}{type-\/safe hash}  \\\cline{1-4}
\doxysectlink{data_type_declarations_hash_complex_type}{hash\texorpdfstring{$<$}{<}string, ...\texorpdfstring{$>$}{>}}{2} &\doxysectlink{container_data_types_hash}{Hash}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} &Restricts key values to the declared type  \\\cline{1-4}
\doxysectlink{data_type_declarations_list_type}{list}{1} &\doxysectlink{container_data_types_list}{List}{1} &\doxysectlink{container_data_types_list}{List}{1} &Restricts values to \doxysectlink{container_data_types_list}{List}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_list_complex_type}{list\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &\doxysectlink{container_data_types_list}{List}{1} &\doxysectlink{container_data_types_list}{List}{1} &Restricts list values to the declared type  \\\cline{1-4}
\doxysectlink{data_type_declarations_object_type}{object}{1} &\doxysectlink{container_data_types_object}{Object}{1} &\doxysectlink{container_data_types_object}{Object}{1} &Restricts values to \doxysectlink{container_data_types_object}{Object}{1} values  \\\cline{1-4}
\doxysectlink{data_type_declarations_classname_type}{object\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{1} &\doxysectlink{container_data_types_object}{Object}{1} &\doxysectlink{container_data_types_object}{Object}{1} &Restricts values to objects of the specific class  \\\cline{1-4}
\doxysectlink{data_type_declarations_classname_type}{\texorpdfstring{$<$}{<}classname\texorpdfstring{$>$}{>}}{1} &\doxysectlink{container_data_types_object}{Object}{1} &\doxysectlink{container_data_types_object}{Object}{1} &Restricts values to objects of the specific class given; either the class name can be given (ex\+: \doxylink{class_qore_1_1_thread_1_1_mutex}{Mutex} or a qualified path to the class\+: \doxylink{class_qore_1_1_thread_1_1_mutex}{Qore\+::\+Thread\+::\+Mutex})  \\\cline{1-4}
\doxysectlink{data_type_declarations_null_type}{null}{1} &\doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_null}{NULL}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_null}{NULL}{1} type; this type has few (if any) practical applications and has been included for completeness\textquotesingle{} sake  \\\cline{1-4}
\doxysectlink{data_type_declarations_nothing_type}{nothing}{1} &\doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_nothing}{NOTHING}{1} type; this type is mostly useful for declaring that a function or method returns no value  \\\cline{1-4}
\doxysectlink{data_type_declarations_timeout_type}{timeout}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1} and converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds  \\\cline{1-4}
\doxysectlink{data_type_declarations_base64binary_type}{base64binary}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Accepts \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts a base-\/64 encoded string to a binary value and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_hexbinary_type}{hexbinary}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Accepts \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts a string of hex digits to a binary value and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softbinary_type}{softbinary}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Accepts \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/binary values to a binary value and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softint_type}{softint}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/integer values to an integer and returns the integer  \\\cline{1-4}
\doxysectlink{data_type_declarations_softfloat_type}{softfloat}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/float values to a float and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softnumber_type}{softnumber}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/number values to a float and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softbool_type}{softbool}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/boolean values to a boolean and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softstring_type}{softstring}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_string}{String}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/string values to a string and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softdate_type}{softdate}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_date}{Date}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/date values to a date and returns the new value  \\\cline{1-4}
\doxysectlink{data_type_declarations_softlist_type}{softlist}{1} &all types &\doxysectlink{container_data_types_list}{List}{1} &Accepts all types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned as an empty list; a list is returned unchanged, and any other type is returned as the first element of a new list  \\\cline{1-4}
\doxysectlink{data_type_declarations_softlist_complex_type}{softlist\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &all types &\doxysectlink{container_data_types_list}{List}{1} &Accepts all data types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned as an empty list; a list is returned with its elements processed by the subtype declaration, and any other type is returned as the first element of a new list, also processed by the subtype declaration  \\\cline{1-4}
\doxysectlink{data_type_declarations_data_type}{data}{1} &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_binary}{Binary}{1} &same as received &Restricts input to \doxysectlink{basic_data_types_string}{String}{1} and \doxysectlink{basic_data_types_binary}{Binary}{1} and returns the same type  \\\cline{1-4}
\doxysectlink{data_type_declarations_code_type}{code}{1} &\doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1} &same as received &Restricts values to \doxysectlink{expressions_closure}{closures}{1} and \doxysectlink{expressions_call_reference}{call references}{1}  \\\cline{1-4}
\doxysectlink{data_type_declarations_reference_type}{reference}{1} &\doxylink{lvalue_references}{References} &the type the reference points to &Restricts values to references to lvalues  \\\cline{1-4}
\doxysectlink{data_type_declarations_reference_complex_type}{reference\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &\doxylink{lvalue_references}{References} &the type given as an argument &Restricts values to references to lvalues compatible with the given type  \\\cline{1-4}
\doxysectlink{data_type_declarations_int_or_nothing_type}{\texorpdfstring{$\ast$}{*}int}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_float_or_nothing_type}{\texorpdfstring{$\ast$}{*}float}{1} &\doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_number_or_nothing_type}{\texorpdfstring{$\ast$}{*}number}{1} &\doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_number}{Number}{1} or \doxysectlink{basic_data_types_number}{Number}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_number}{Number}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_bool_or_nothing_type}{\texorpdfstring{$\ast$}{*}bool}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_boolean}{Boolean}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_string_or_nothing_type}{\texorpdfstring{$\ast$}{*}string}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_date_or_nothing_type}{\texorpdfstring{$\ast$}{*}date}{1} &\doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_date}{Date}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_date}{Date}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} type; values may be either absolute or relative date/time values; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_binary_or_nothing_type}{\texorpdfstring{$\ast$}{*}binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_binary}{Binary}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_hash_or_nothing_type}{\texorpdfstring{$\ast$}{*}hash}{1} &\doxysectlink{container_data_types_hash}{Hash}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_hash_hashdecl_or_nothing_type}{\texorpdfstring{$\ast$}{*}hash\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &\doxysectlink{container_data_types_hash}{Hash}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to values of the referenced \doxylink{hashdecl}{type-\/safe hash} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_hash_complex_or_nothing_type}{\texorpdfstring{$\ast$}{*}hash\texorpdfstring{$<$}{<}string, ...\texorpdfstring{$>$}{>}}{2} &\doxysectlink{container_data_types_hash}{Hash}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts key values to the declared complex hash or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_list_or_nothing_type}{\texorpdfstring{$\ast$}{*}list}{1} &\doxysectlink{container_data_types_list}{List}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts either a \doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_list_complex_or_nothing_type}{\texorpdfstring{$\ast$}{*}list\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &\doxysectlink{container_data_types_list}{List}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts list values to the declared complex list type or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_object_or_nothing_type}{\texorpdfstring{$\ast$}{*}object}{1} &\doxysectlink{container_data_types_object}{Object}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_object}{Object}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts either an \doxysectlink{container_data_types_object}{Object}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_classname_type_or_nothing}{\texorpdfstring{$\ast$}{*}\texorpdfstring{$<$}{<}classname\texorpdfstring{$>$}{>}}{1} &\doxysectlink{container_data_types_object}{Object}{1} of the given class, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_object}{Object}{1} of the given class or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to objects of the specific class given or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; either the class name can be given (ex\+: \doxylink{class_qore_1_1_thread_1_1_mutex}{\texorpdfstring{$\ast$}{*}\+Mutex} or a qualified path to the class\+: \doxylink{class_qore_1_1_thread_1_1_mutex}{\texorpdfstring{$\ast$}{*}\+Qore\+::Thread\+::Mutex}); if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_classname_type_or_nothing}{\texorpdfstring{$\ast$}{*}object\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{1} &\doxysectlink{container_data_types_object}{Object}{1} of the given class, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_object}{Object}{1} of the given class or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to objects of the specific class given or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_null_or_nothing_type}{\texorpdfstring{$\ast$}{*}null}{1} &\doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts input to \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and returns the same type  \\\cline{1-4}
\doxysectlink{data_type_declarations_data_or_nothing_type}{\texorpdfstring{$\ast$}{*}data}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts input to \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and returns the same type; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_code_or_nothing_type}{\texorpdfstring{$\ast$}{*}code}{1} &\doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{expressions_closure}{closures}{1}, \doxysectlink{expressions_call_reference}{call references}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_timeout_or_nothing_type}{\texorpdfstring{$\ast$}{*}timeout}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1} and converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_reference_or_nothing_type}{\texorpdfstring{$\ast$}{*}reference}{1} &\doxylink{lvalue_references}{References}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &the type the reference points to and \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to references to lvalues and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_reference_complex_or_nothing_type}{\texorpdfstring{$\ast$}{*}reference\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &\doxylink{lvalue_references}{References}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &the type given as an argument and \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to references to lvalues compatible with the given type and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softint_or_nothing_type}{\texorpdfstring{$\ast$}{*}softint}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/integer values to an integer and returns the integer. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softfloat_or_nothing_type}{\texorpdfstring{$\ast$}{*}softfloat}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/float values to a float and returns the new value. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softnumber_or_nothing_type}{\texorpdfstring{$\ast$}{*}softnumber}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_number}{Number}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/number values to a number and returns the new value. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softbool_or_nothing_type}{\texorpdfstring{$\ast$}{*}softbool}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/boolean values to a boolean and returns the new value. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softstring_or_nothing_type}{\texorpdfstring{$\ast$}{*}softstring}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/string values to a string and returns the new value. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softdate_or_nothing_type}{\texorpdfstring{$\ast$}{*}softdate}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_date}{Date}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} and converts non-\/date values to a date and returns the new value. If no value or \doxysectlink{basic_data_types_null}{NULL}{1} is passed, then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\doxysectlink{data_type_declarations_softlist_or_nothing_type}{\texorpdfstring{$\ast$}{*}softlist}{1} &all types &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts all types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and list values are returned as the same value; \doxysectlink{basic_data_types_null}{NULL}{1} is returned as \doxysectlink{basic_data_types_nothing}{NOTHING}{1}, any other type is returned as the first element of a new list  \\\cline{1-4}
\doxysectlink{data_type_declarations_softlist_complex_or_nothing_type}{\texorpdfstring{$\ast$}{*}softlist\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}}{2} &all types &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts all data types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} are returned as \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; a list is returned with its elements processed by the declared subtype, and any other type is returned as the first element of a new list with its element processed by the declared subtype  \\\cline{1-4}
\doxysectlink{data_type_declarations_any_type}{any}{1} &any &same as received &Provides no restrictions on the type of value it receives and returns the same value, however complex type information is stripped on assignment for backwards compatibility; note that the {\ttfamily any} type restriction is the same as using no type restriction; to assign any type without stripping complex types, use the \doxysectlink{data_type_declarations_auto_type}{auto}{1} type restriction instead  \\\cline{1-4}
\doxysectlink{data_type_declarations_auto_type}{auto}{1} &all data types &all data types &Provides no restrictions on the type of value it receives and returns the same value; does not strip complex types on assignment like \doxysectlink{data_type_declarations_any_type}{any}{1}  \\\cline{1-4}
\end{longtabu}


\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_int_type}{}\doxysubsection{\texorpdfstring{int}{int}}\label{data_type_declarations_int_type}
{\bfseries{int Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily int}  &\doxysectlink{basic_data_types_integer}{Integer}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_integer}{Integer}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{int\ sub\ foo(int\ i)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ i;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_float_type}{}\doxysubsection{\texorpdfstring{float}{float}}\label{data_type_declarations_float_type}
{\bfseries{float Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily float}  &\doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_integer}{Integer}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_float}{Float}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{float\ sub\ foo(float\ f\ =\ M\_PI)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ f;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_number_type}{}\doxysubsection{\texorpdfstring{number}{number}}\label{data_type_declarations_number_type}
{\bfseries{number Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily number}  &\doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, or \doxysectlink{basic_data_types_integer}{Integer}{1} &\doxysectlink{basic_data_types_number}{Number}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_number}{Number}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{number\ sub\ foo(number\ n\ =\ 2.35e40)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ n;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the number type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_bool_type}{}\doxysubsection{\texorpdfstring{bool}{bool}}\label{data_type_declarations_bool_type}
{\bfseries{bool Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily bool}  &\doxysectlink{basic_data_types_boolean}{Boolean}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_boolean}{Boolean}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool\ sub\ foo(bool\ b)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ b;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_string_type}{}\doxysubsection{\texorpdfstring{string}{string}}\label{data_type_declarations_string_type}
{\bfseries{string Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily string}  &\doxysectlink{basic_data_types_string}{String}{1} &\doxysectlink{basic_data_types_string}{String}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_string}{String}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ sub\ foo(string\ str\ =\ \textcolor{stringliteral}{"{}bar"{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ str;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_date_type}{}\doxysubsection{\texorpdfstring{date}{date}}\label{data_type_declarations_date_type}
{\bfseries{date Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily date}  &\doxysectlink{basic_data_types_date}{Date}{1} &\doxysectlink{basic_data_types_date}{Date}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_date}{Date}{1} type; date/time values can be either \doxysectlink{basic_data_types_absolute_dates}{absolute}{2} or \doxysectlink{basic_data_types_relative_dates}{relative}{2}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{date\ sub\ foo(date\ d\ =\ now\_us())\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ d;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_binary_type}{}\doxysubsection{\texorpdfstring{binary}{binary}}\label{data_type_declarations_binary_type}
{\bfseries{binary Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily binary}  &\doxysectlink{basic_data_types_binary}{Binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_binary}{Binary}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary\ sub\ foo(binary\ b)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ b;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_hash_type}{}\doxysubsection{\texorpdfstring{hash}{hash}}\label{data_type_declarations_hash_type}
{\bfseries{hash Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily hash}  &\doxysectlink{container_data_types_hash}{Hash}{1} (all) &\doxysectlink{container_data_types_hash}{Hash}{1} (untyped) &Restricts values to Qore\textquotesingle{}s \doxysectlink{container_data_types_hash}{Hash}{1} type; if a typed hash is received, type information is removed for the lvalue assignment  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash\ sub\ foo(hash\ h\ =\ (\textcolor{stringliteral}{"{}foo"{}}:\ \textcolor{stringliteral}{"{}bar"{}},\ \textcolor{stringliteral}{"{}x"{}}:\ 2))\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ h;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_hash_hashdecl_type}{}\doxysubsubsection{\texorpdfstring{Type-\/\+Safe Hash Type}{Type-Safe Hash Type}}\label{data_type_declarations_hash_hashdecl_type}
{\bfseries{\doxylink{hashdecl}{hashdecl} Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily hash}  &\doxysectlink{container_data_types_hash}{hash}{1}\texorpdfstring{$<$}{<}{\itshape \doxylink{hashdecl}{hashdecl}\texorpdfstring{$>$}{>}} &\doxysectlink{container_data_types_hash}{hash}{1}\texorpdfstring{$<$}{<}{\itshape \doxylink{hashdecl}{hashdecl}\texorpdfstring{$>$}{>}}\texorpdfstring{$>$}{>} &Restricts values to hashes created from the given \doxylink{hashdecl}{hashdecl}  \\\cline{1-4}
\end{longtabu}


The hash type takes a single \doxylink{hashdecl}{type-\/safe hash} name (or namespace-\/ prefixed path) in angle brackets after {\ttfamily "{}hash"{}} which results in a type declaration restricted to the declared \doxylink{hashdecl}{type-\/safe hash} as in the following example.

\begin{DoxyParagraph}{Examples}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#\ hashdecl\ typed\ hash\ declaration}}
\DoxyCodeLine{hashdecl\ MyHash\ \{}
\DoxyCodeLine{\ \ \ \ string\ foo\ =\ \textcolor{stringliteral}{"{}empty"{}};}
\DoxyCodeLine{\ \ \ \ int\ x\ =\ 1;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ declaration\ and\ initialization\ to\ default\ key\ values}}
\DoxyCodeLine{hash<MyHash>\ h1();}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ declaration\ and\ initialization\ with\ explicit\ values}}
\DoxyCodeLine{hash<MyHash>\ h2((\textcolor{stringliteral}{"{}foo"{}}:\ \textcolor{stringliteral}{"{}string"{}},\ \textcolor{stringliteral}{"{}x"{}}:\ 10));}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ declaration\ and\ initialization\ with\ the\ new\ operator}}
\DoxyCodeLine{hash<MyHash>\ h3\ =\ new\ hash<MyHash>((\textcolor{stringliteral}{"{}foo"{}}:\ \textcolor{stringliteral}{"{}string"{}},\ \textcolor{stringliteral}{"{}x"{}}:\ 10));}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ example\ of\ a\ function\ with\ a\ typed\ hash\ return\ type\ and\ parameter\ type}}
\DoxyCodeLine{hash<MyHash>\ sub\ foo(hash<MyHash>\ h\ =\ new\ hash<MyHash>(\textcolor{stringliteral}{"{}foo"{}}:\ \textcolor{stringliteral}{"{}bar"{}},\ \textcolor{stringliteral}{"{}x"{}}:\ 2))\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ h;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ example\ of\ a\ function\ with\ a\ typed\ hash\ return\ type\ and\ a\ cast\ to\ a\ typed\ hash\ return\ type}}
\DoxyCodeLine{hash<MyHash>\ sub\ foo(int\ x)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ cast<hash<MyHash>>(get\_hash(x));}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
This type is supported at parse-\/time and at runtime; to convert such values to an untyped hash, assign it to a \doxysectlink{data_type_declarations_hash_type}{hash}{1} lvalue, use \doxysectlink{operators_cast}{cast\texorpdfstring{$<$}{<}hash\texorpdfstring{$>$}{>}(...)}{2} on the value, call the \doxylink{group__type__conversion__functions_ga2c6a87e3a5b1ab302a1fc6d390754024}{hash()} function on the value, or assign it to an untyped lvalue. Each of these options can be used to convert a type-\/safe hash to an untyped hash.

Complex type information is lost when assigning to an lvalue with a compatible but more generic type or by assigning to an untyped lvalue; this was necessary to allow complex types to be introduced in Qore without breaking backwards compatibility.

However, a special single argument, {\ttfamily "{}auto"{}}, allows for the lvalue to maintain the complex hash type as in the following example\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{hash\ h0\ =\ (\textcolor{stringliteral}{"{}a"{}}:\ 2,\ \textcolor{stringliteral}{"{}b"{}}:\ 3);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}hash"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ h0.fullType());}
\DoxyCodeLine{hash<auto>\ h1\ =\ new\ hash<MyHash>();}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}hash<MyHash>"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ h1.fullType());}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{hashdecl}{Hashdecl\+: Type-\/\+Safe Hash Declarations}
\item \doxysectlink{operators_new}{New Value Operator (new)}{2}
\item \doxysectlink{operators_cast}{Cast Operator (cast$<$$>$())}{2}
\end{DoxyItemize}
\end{DoxySeeAlso}
\hypertarget{data_type_declarations_hash_complex_type}{}\doxysubsubsection{\texorpdfstring{Hash With Declared Value Type}{Hash With Declared Value Type}}\label{data_type_declarations_hash_complex_type}
{\bfseries{Complex hash Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily hash}  &\doxysectlink{container_data_types_hash}{hash}{1}\texorpdfstring{$<$}{<}string, {\itshape \doxylink{data_type_declarations}{type}}\texorpdfstring{$>$}{>} &\doxysectlink{container_data_types_hash}{hash}{1}\texorpdfstring{$<$}{<}string, {\itshape \doxylink{data_type_declarations}{type}}\texorpdfstring{$>$}{>} &Restricts values to hashes with the given declared key type; use \doxysectlink{operators_cast}{cast\texorpdfstring{$<$}{<}\texorpdfstring{$>$}{>}(...)}{2} to convert values to this type at runtime.  \\\cline{1-4}
\end{longtabu}


The hash type also supports two arguments in angle brackets to specify the key and value types, however the key type currently must always be \doxysectlink{data_type_declarations_string_type}{string}{1}. This results in a hash where the keys and values must always be of the declared type. See the following example for more information.

\begin{DoxyParagraph}{Examples}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#\ 1:\ declaration\ and\ initialization\ (identical\ to\ 2\ and\ 3)}}
\DoxyCodeLine{hash<string,\ int>\ h1((}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}code"{}}:\ 500,}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}type"{}}:\ 300,}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}value"{}}:\ 0,}
\DoxyCodeLine{));}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ 2:\ declaration\ and\ initialization\ with\ the\ assignment\ operator\ (identical\ to\ 1\ and\ 3)}}
\DoxyCodeLine{hash<string,\ int>\ h2\ =\ (}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}code"{}}:\ 500,}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}type"{}}:\ 300,}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}value"{}}:\ 0,}
\DoxyCodeLine{);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ 3:\ declaration\ and\ initialization\ with\ the\ new\ operator\ (identical\ to\ 1\ and\ 2)}}
\DoxyCodeLine{hash<string,\ int>\ h3\ =\ new\ hash<string,\ int>((}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}code"{}}:\ 500,}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}type"{}}:\ 300,}
\DoxyCodeLine{\ \ \ \ \textcolor{stringliteral}{"{}value"{}}:\ 0,}
\DoxyCodeLine{));}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ assignment\ from\ an\ untyped\ hash\ with\ the\ cast<>\ operator\ (can\ result\ in\ runtime\ type\ errors)}}
\DoxyCodeLine{hash<string,\ int>\ h4\ =\ cast<hash<string,\ int>>(get\_hash());}

\end{DoxyCode}

\end{DoxyParagraph}
This type is supported at parse-\/time and at runtime; to convert such values to an untyped hash, assign it to a \doxysectlink{data_type_declarations_hash_type}{hash}{1} lvalue, use \doxysectlink{operators_cast}{cast\texorpdfstring{$<$}{<}hash\texorpdfstring{$>$}{>}(...)}{2} on the value, call the \doxylink{group__type__conversion__functions_ga2c6a87e3a5b1ab302a1fc6d390754024}{hash()} function on the value, or assign it to an untyped lvalue. Each of these options can be used to convert a type-\/safe hash to an untyped hash.

Complex type information is lost when assigning to an lvalue with a compatible but more generic type or by assigning to an untyped lvalue; this was necessary to allow complex types to be introduced in Qore without breaking backwards compatibility.

However, a special single argument, {\ttfamily "{}auto"{}}, allows for the lvalue to maintain the complex hash type as in the following example\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{hash\ h0\ =\ (\textcolor{stringliteral}{"{}a"{}}:\ 2,\ \textcolor{stringliteral}{"{}b"{}}:\ 3);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}hash"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ h0.fullType());}
\DoxyCodeLine{hash<auto>\ h1\ =\ (\textcolor{stringliteral}{"{}a"{}}:\ 2,\ \textcolor{stringliteral}{"{}b"{}}:\ 3);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}hash<string,\ int>"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ h1.fullType());}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxylink{hashdecl}{Hashdecl\+: Type-\/\+Safe Hash Declarations}
\item \doxysectlink{operators_new}{New Value Operator (new)}{2}
\item \doxysectlink{operators_cast}{Cast Operator (cast$<$$>$())}{2}
\end{DoxyItemize}
\end{DoxySeeAlso}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_list_type}{}\doxysubsection{\texorpdfstring{list}{list}}\label{data_type_declarations_list_type}
{\bfseries{list Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily list}  &\doxysectlink{container_data_types_list}{List}{1} &\doxysectlink{container_data_types_list}{List}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{container_data_types_list}{List}{1} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{list\ sub\ foo(list\ l\ =\ (\textcolor{stringliteral}{"{}foo"{}},\ \textcolor{stringliteral}{"{}bar"{}}))\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ l;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_list_complex_type}{}\doxysubsubsection{\texorpdfstring{List With Declared Value Type}{List With Declared Value Type}}\label{data_type_declarations_list_complex_type}
{\bfseries{Complex list Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily list}  &\doxysectlink{container_data_types_list}{list}{1}\texorpdfstring{$<$}{<}{\itshape \doxylink{data_type_declarations}{type}}\texorpdfstring{$>$}{>} &\doxysectlink{container_data_types_list}{list}{1}\texorpdfstring{$<$}{<}{\itshape \doxylink{data_type_declarations}{type}}\texorpdfstring{$>$}{>} &Restricts values to lists with the given declared value type; use \doxysectlink{operators_cast}{cast\texorpdfstring{$<$}{<}\texorpdfstring{$>$}{>}(...)}{2} to convert values to this type at runtime.  \\\cline{1-4}
\end{longtabu}


The list type supports one type argument in angle brackets to specify the value type. This results in a list where the values must always be of the declared type. See the following example for more information.

\begin{DoxyParagraph}{Examples}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#\ 1:\ declaration\ and\ initialization\ (identical\ to\ 2\ and\ 3)}}
\DoxyCodeLine{list<int>\ l1(500,\ 300,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ 2:\ declaration\ and\ initialization\ with\ the\ assignment\ operator\ (identical\ to\ 1\ and\ 3)}}
\DoxyCodeLine{list<int>\ l2\ =\ (500,\ 300,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ 3:\ declaration\ and\ initialization\ with\ the\ new\ operator\ (identical\ to\ 1\ and\ 2)}}
\DoxyCodeLine{list<int>\ l3\ =\ new\ list<int>(500,\ 300,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ assignment\ from\ an\ untyped\ list\ with\ the\ cast<>\ operator\ (can\ result\ in\ runtime\ type\ errors)}}
\DoxyCodeLine{list<int>\ l4\ =\ cast<list<int>>(get\_list());}

\end{DoxyCode}

\end{DoxyParagraph}
This type is supported at parse-\/time and at runtime; to convert such values to an untyped list, assign it to a \doxysectlink{data_type_declarations_list_type}{list}{1} lvalue, use \doxysectlink{operators_cast}{cast\texorpdfstring{$<$}{<}list\texorpdfstring{$>$}{>}(...)}{2} on the value, call the \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list()} function on the value, or assign it to an untyped lvalue. Each of these options can be used to convert a type-\/safe list to an untyped list.

Complex type information is lost when assigning to an lvalue with a compatible but more generic type or by assigning to an untyped lvalue; this was necessary to allow complex types to be introduced in Qore without breaking backwards compatibility.

However, a special single argument, {\ttfamily "{}auto"{}}, allows for the lvalue to maintain the complex list type as in the following example\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{list\ l0\ =\ (2,\ 3);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}list"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ l0.fullType());}
\DoxyCodeLine{list<auto>\ l1\ =\ (2,\ 3);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}list<int>"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ l1.fullType());}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxysectlink{operators_new}{New Value Operator (new)}{2}
\item \doxysectlink{operators_cast}{Cast Operator (cast$<$$>$())}{2}
\end{DoxyItemize}
\end{DoxySeeAlso}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_object_type}{}\doxysubsection{\texorpdfstring{object}{object}}\label{data_type_declarations_object_type}
{\bfseries{object Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily object}  &\doxysectlink{container_data_types_object}{Object}{1} &\doxysectlink{container_data_types_object}{Object}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{container_data_types_object}{Object}{1} type; note that any class name can also be used as a type restriction directly  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{object\ sub\ foo(object\ o\ =\ new\ Mutex())\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ o;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_object_complex_type}{}\doxysubsubsection{\texorpdfstring{Class-\/\+Specific Type Declaration}{Class-Specific Type Declaration}}\label{data_type_declarations_object_complex_type}
{\bfseries{Complex object Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily object}  &\doxysectlink{container_data_types_object}{object}{1}\texorpdfstring{$<$}{<}{\itshape \doxylink{qore_classes}{class}}\texorpdfstring{$>$}{>} &\doxysectlink{container_data_types_object}{object}{1}\texorpdfstring{$<$}{<}{\itshape \doxylink{qore_classes}{class}}\texorpdfstring{$>$}{>} &Restricts values to objects of the given class  \\\cline{1-4}
\end{longtabu}


The object type declaration takes a single \doxylink{qore_classes}{class} name (or namespace-\/ prefixed path) in angle brackets after {\ttfamily "{}object"{}} which results in a type declaration restricted to the declared \doxylink{qore_classes}{class} as in the following example.

\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{object<MyClass>\ sub\ foo(MyClass\ o\ =\ new\ MyClass())\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ o;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
this type declaration is equivalent to using the class name by itself
\end{DoxyNote}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_classname_type}{}\doxysubsection{\texorpdfstring{$<$classname$>$}{<classname>}}\label{data_type_declarations_classname_type}
{\bfseries{\texorpdfstring{$<$}{<}classname\texorpdfstring{$>$}{>} Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\itshape any class name} &\doxysectlink{container_data_types_object}{Object}{1} of the particular class given &\doxysectlink{container_data_types_object}{Object}{1} of the particular class given &Restricts values to objects of the particular class given; subclasses are also accepted  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{Mutex\ sub\ foo(Qore::Thread::Mutex\ m\ =\ new\ Mutex())\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ m;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_null_type}{}\doxysubsection{\texorpdfstring{null}{null}}\label{data_type_declarations_null_type}
{\bfseries{null Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily null}  &\doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_null}{NULL}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_null}{NULL}{1} type; this type has few (if any) practical applications and has been included for completeness\textquotesingle{} sake  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#\ I\ don't\ know\ if\ this\ type\ has\ any\ useful/practical\ applications...}}
\DoxyCodeLine{null\ n\ =\ NULL;}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_nothing_type}{}\doxysubsection{\texorpdfstring{nothing}{nothing}}\label{data_type_declarations_nothing_type}
{\bfseries{nothing Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily nothing}  &\doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_nothing}{NOTHING}{1} type; this type is mostly useful for declaring that a function or method returns no value  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{nothing\ sub\ bar()\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}foo\(\backslash\)n"{}});}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_timeout_type}{}\doxysubsection{\texorpdfstring{timeout}{timeout}}\label{data_type_declarations_timeout_type}
{\bfseries{timeout Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily timeout}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1} values and converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{timeout\ sub\ foo(timeout\ to\ =\ 1250ms)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ to;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
Assigned variables of this type return integers where a single unit equals one millisecond; when an integer is converted to a date/time value, it is converted with a single unit equalling one second, therefore unexpected values can result when performing arithmetic operations with these values. Qore handles simple addition and subtraction correctly with mixed date/time values and timeout variables when the variable is used directly in the operation, but other operations will most likely not produce the expected results. It\textquotesingle{}s recommended to avoid doing direct arithmetic with timeout values for this reason.
\end{DoxyNote}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_base64binary_type}{}\doxysubsection{\texorpdfstring{base64binary}{base64binary}}\label{data_type_declarations_base64binary_type}
{\bfseries{base64binary Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily base64binary}  &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} &Accepts \doxysectlink{basic_data_types_string}{String}{1} values by converting base64-\/encoded strings to a binary value and returns the binary  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{base64binary\ sub\ foo(base64binary\ n\ =\ \textcolor{stringliteral}{"{}qw=="{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ n;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
invalid base64-\/encoded strings cause an exception to be thrown
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxysectlink{data_type_declarations_softbinary_type}{softbinary}{1}
\item \doxysectlink{data_type_declarations_hexbinary_type}{hexbinary}{1}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 1.\+7 introduced the base64binary type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_hexbinary_type}{}\doxysubsection{\texorpdfstring{hexbinary}{hexbinary}}\label{data_type_declarations_hexbinary_type}
{\bfseries{hexbinary Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily hexbinary}  &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} &Accepts \doxysectlink{basic_data_types_string}{String}{1} values by converting hex strings to a binary value and returns the binary  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary\ sub\ foo(hexbinary\ n\ =\ \textcolor{stringliteral}{"{}abcd"{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ n;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
hex binary strings must have an even number of characters, any invalid characters cause an exception to be thrown
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxysectlink{data_type_declarations_base64binary_type}{base64binary}{1}
\item \doxysectlink{data_type_declarations_softbinary_type}{softbinary}{1}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 1.\+7 introduced the hexbinary type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softbinary_type}{}\doxysubsection{\texorpdfstring{softbinary}{softbinary}}\label{data_type_declarations_softbinary_type}
{\bfseries{softbinary Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softbinary}  &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} &Accepts \doxysectlink{basic_data_types_string}{String}{1} values and converts non-\/binary values to a binary directly and returns the binary  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softbinary\ sub\ foo(softbinary\ n\ =\ \textcolor{stringliteral}{"{}1000"{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ n;}
\DoxyCodeLine{\}}

\end{DoxyCode}

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

\begin{DoxyItemize}
\item \doxysectlink{data_type_declarations_base64binary_type}{base64binary}{1}
\item \doxysectlink{data_type_declarations_hexbinary_type}{hexbinary}{1}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+5 introduced the softbinary type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softint_type}{}\doxysubsection{\texorpdfstring{softint}{softint}}\label{data_type_declarations_softint_type}
{\bfseries{softint Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softint}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/integer values to an integer and returns the integer  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softint\ sub\ foo(softint\ i\ =\ \textcolor{stringliteral}{"{}1000"{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{\#\ note\ that\ "{}200"{}\ will\ be\ converted\ to\ an\ integer\ on\ return}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ i\ >\ 500\ ?\ \textcolor{stringliteral}{"{}200"{}}\ :\ i;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softfloat_type}{}\doxysubsection{\texorpdfstring{softfloat}{softfloat}}\label{data_type_declarations_softfloat_type}
{\bfseries{softfloat Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softfloat}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_float}{Float}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/float values to a float and returns the float  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softfloat\ sub\ foo(softfloat\ f\ =\ \textcolor{stringliteral}{"{}1000"{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{\#\ note\ that\ "{}200"{}\ will\ be\ converted\ to\ a\ float\ on\ return}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ f\ >\ 500.0\ ?\ \textcolor{stringliteral}{"{}200"{}}\ :\ f;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softnumber_type}{}\doxysubsection{\texorpdfstring{softnumber}{softnumber}}\label{data_type_declarations_softnumber_type}
{\bfseries{softnumber Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softnumber}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{data_type_declarations_number_type}{number}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/number values to a number and returns the number  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softnumber\ sub\ foo(softnumber\ n\ =\ \textcolor{stringliteral}{"{}1000"{}})\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{\#\ note\ that\ "{}200"{}\ will\ be\ converted\ to\ a\ number\ on\ return}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ n\ >\ 500.0n\ ?\ \textcolor{stringliteral}{"{}200"{}}\ :\ n;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the softnumber type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softbool_type}{}\doxysubsection{\texorpdfstring{softbool}{softbool}}\label{data_type_declarations_softbool_type}
{\bfseries{softbool Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softbool}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/boolean values to a boolean and returns the boolean  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softbool\ b\ =\ \textcolor{stringliteral}{"{}0.5"{}};}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softstring_type}{}\doxysubsection{\texorpdfstring{softstring}{softstring}}\label{data_type_declarations_softstring_type}
{\bfseries{softstring Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softstring}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_string}{String}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/string values to a string and returns the string  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softstring\ str\ =\ 200;}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softdate_type}{}\doxysubsection{\texorpdfstring{softdate}{softdate}}\label{data_type_declarations_softdate_type}
{\bfseries{softdate Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softdate}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1} &\doxysectlink{basic_data_types_date}{Date}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/date values to a date and returns the date  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softdate\ d\ =\ \textcolor{stringliteral}{"{}2001-\/10-\/10T20:00:05\ +04:00"{}};}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softlist_type}{}\doxysubsection{\texorpdfstring{softlist}{softlist}}\label{data_type_declarations_softlist_type}
{\bfseries{softlist Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softlist}  &all data types &\doxysectlink{container_data_types_list}{List}{1} &Accepts all data types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned as an empty list; a list is returned unchanged, and any other type is returned as the first element of a new list  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{softlist\ sub\ foo(softlist\ l)\ \{}
\DoxyCodeLine{\ \ \ \ foreach\ any\ element\ \textcolor{keywordflow}{in}\ (\(\backslash\)l)\ \{}
\DoxyCodeLine{\ \ \ \ \}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ l;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_softlist_complex_type}{}\doxysubsubsection{\texorpdfstring{Softlist With Declared Value Type}{Softlist With Declared Value Type}}\label{data_type_declarations_softlist_complex_type}
{\bfseries{Complex list Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily softlist}  &all data types &\doxysectlink{container_data_types_list}{List}{1} &Accepts all data types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned as an empty list; a list is returned with its elements processed by the subtype declaration, and any other type is returned as the first element of a new list, also processed by the subtype declaration  \\\cline{1-4}
\end{longtabu}


The softlist type supports one type argument in angle brackets to specify the value type. This results in a list where the values must always be of the declared type. See the following example for more information.

\begin{DoxyParagraph}{Examples}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#\ 1:\ declaration\ and\ initialization\ (identical\ to\ 2\ and\ 3)}}
\DoxyCodeLine{softlist<int>\ l1(500,\ 300,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ 2:\ declaration\ and\ initialization\ with\ the\ assignment\ operator\ (identical\ to\ 1\ and\ 3)}}
\DoxyCodeLine{softlist<int>\ l2\ =\ (500,\ 300,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ 3:\ declaration\ and\ initialization\ with\ the\ new\ operator\ (identical\ to\ 1\ and\ 2)}}
\DoxyCodeLine{softlist<int>\ l3\ =\ new\ list<int>(500,\ 300,\ 0);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\#\ assignment\ from\ an\ untyped\ list\ with\ the\ cast<>\ operator\ (can\ result\ in\ runtime\ type\ errors)}}
\DoxyCodeLine{softlist<int>\ l4\ =\ cast<list<int>>(get\_list());}

\end{DoxyCode}

\end{DoxyParagraph}
This type is supported at parse-\/time and at runtime; to convert such values to an untyped list, assign it to a \doxysectlink{data_type_declarations_list_type}{list}{1} lvalue, use \doxysectlink{operators_cast}{cast\texorpdfstring{$<$}{<}list\texorpdfstring{$>$}{>}(...)}{2} on the value, call the \doxylink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list()} function on the value, or assign it to an untyped lvalue. Each of these options can be used to convert a type-\/safe list to an untyped list.

Complex type information is lost when assigning to an lvalue with a compatible but more generic type or by assigning to an untyped lvalue; this was necessary to allow complex types to be introduced in Qore without breaking backwards compatibility.

However, a special single argument, {\ttfamily "{}auto"{}}, allows for the lvalue to maintain the complex list type as in the following example\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{softlist\ l0\ =\ 1;}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}list"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ l0.fullType());}
\DoxyCodeLine{softlist<auto>\ l1\ =\ (1,\ );}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}list<int>"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%y\(\backslash\)n"{}},\ l1.fullType());}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \doxysectlink{operators_new}{New Value Operator (new)}{2}
\item \doxysectlink{operators_cast}{Cast Operator (cast$<$$>$())}{2}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+3 introduced the softlist type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_data_type}{}\doxysubsection{\texorpdfstring{data}{data}}\label{data_type_declarations_data_type}
{\bfseries{data Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily data}  &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_binary}{Binary}{1} &same as received &Restricts values to \doxysectlink{basic_data_types_string}{String}{1} and \doxysectlink{basic_data_types_binary}{Binary}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{data\ sub\ foo(data\ d)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ d;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_code_type}{}\doxysubsection{\texorpdfstring{code}{code}}\label{data_type_declarations_code_type}
{\bfseries{code Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily code}  &\doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1} &same as received &Restricts values to \doxysectlink{expressions_closure}{Closures}{1} and \doxysectlink{expressions_call_reference}{Call References}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(code\ c)\ \{}
\DoxyCodeLine{\ \ \ \ c();}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
that also {\ttfamily "{}closure"{}} and {\ttfamily "{}callref"{}} are accepted as synonyms for {\ttfamily "{}code"{}} (they are not more specific than {\ttfamily "{}code"{}} but rather provide identical type restrictions)
\end{DoxyNote}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_reference_type}{}\doxysubsection{\texorpdfstring{reference}{reference}}\label{data_type_declarations_reference_type}
{\bfseries{reference Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily reference}  &\doxylink{lvalue_references}{References} &the type the reference points to &Requires a reference to an lvalue to be assigned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(reference\ f)\ \{}
\DoxyCodeLine{\ \ \ \ f\ =\ 10;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{int\ i;}
\DoxyCodeLine{foo(\(\backslash\)i);}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_reference_complex_type}{}\doxysubsubsection{\texorpdfstring{Reference With Declared LValue Type}{Reference With Declared LValue Type}}\label{data_type_declarations_reference_complex_type}
{\bfseries{Complex reference Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily reference}  &\doxylink{lvalue_references}{reference}\texorpdfstring{$<$}{<}{\itshape \doxylink{data_type_declarations}{type}}\texorpdfstring{$>$}{>} &type as given as the arg &Restricts values to references to lvalues with a type compatible to that given as the type argument  \\\cline{1-4}
\end{longtabu}


The reference type supports one type argument in angle brackets to specify a compatible lvalue type. See the following example for more information.

\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{int\ i\ =\ 0;}
\DoxyCodeLine{reference<int>\ r\ =\ \(\backslash\)i;}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_int_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}int}{*int}}\label{data_type_declarations_int_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}int Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}int}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_integer}{Integer}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*int\ sub\ foo(*int\ i)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ i;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_float_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}float}{*float}}\label{data_type_declarations_float_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}float Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}float}  &\doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_float}{Float}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*float\ sub\ foo(*float\ f)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ f;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_number_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}number}{*number}}\label{data_type_declarations_number_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}number Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}number}  &\doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_number}{Number}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_number}{Number}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*number\ sub\ foo(*number\ n)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ n;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the \texorpdfstring{$\ast$}{*}number type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_bool_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}bool}{*bool}}\label{data_type_declarations_bool_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}bool Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}bool}  &\doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_boolean}{Boolean}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*bool\ sub\ foo(*bool\ b)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ b;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_string_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}string}{*string}}\label{data_type_declarations_string_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}string Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}string}  &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_string}{String}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string\ sub\ foo(*string\ str)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ str;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_date_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}date}{*date}}\label{data_type_declarations_date_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}date Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}date}  &\doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_date}{Date}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_date}{Date}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*date\ sub\ foo(*date\ str)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ str;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_binary_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}binary}{*binary}}\label{data_type_declarations_binary_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}binary Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}binary}  &\doxysectlink{basic_data_types_binary}{Binary}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_binary}{Binary}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_binary}{Binary}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*binary\ sub\ foo(*binary\ b)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ b;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_hash_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}hash}{*hash}}\label{data_type_declarations_hash_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}hash Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}hash}  &\doxysectlink{container_data_types_hash}{Hash}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{container_data_types_hash}{Hash}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash\ sub\ foo(*hash\ h)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ h;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_hash_hashdecl_or_nothing_type}{}\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}hash$<$...$>$}{*hash<...>}}\label{data_type_declarations_hash_hashdecl_or_nothing_type}
{\bfseries{Complex Hashdecl or Nothing Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}hash\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}} &\doxysectlink{container_data_types_hash}{Hash}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to values of the referenced \doxylink{hashdecl}{type-\/safe hash} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<MyHash>\ sub\ foo(*hash<MyHash>\ h)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ h;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_hash_complex_or_nothing_type}{}\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}hash$<$string, ...$>$}{*hash<string, ...>}}\label{data_type_declarations_hash_complex_or_nothing_type}
{\bfseries{Complex Hash or Nothing Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}hash\texorpdfstring{$<$}{<}string, ...\texorpdfstring{$>$}{>}} &\doxysectlink{container_data_types_hash}{Hash}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_hash}{Hash}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts key values to the declared complex hash or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<string,\ int>\ sub\ foo(*hash<string,\ int>\ h)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ h;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_list_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}list}{*list}}\label{data_type_declarations_list_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}list Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}list}  &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{container_data_types_list}{List}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*list\ sub\ foo(*list\ l)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ l;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_list_complex_or_nothing_type}{}\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}list$<$...$>$}{*list<...>}}\label{data_type_declarations_list_complex_or_nothing_type}
{\bfseries{Complex List or Nothing Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}list\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}} &\doxysectlink{container_data_types_list}{List}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts list values to the declared complex list type or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*list<int>\ sub\ foo(*list<int>\ l)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ l;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_object_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}object}{*object}}\label{data_type_declarations_object_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}list Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}list}  &\doxysectlink{container_data_types_object}{Object}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_object}{Object}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{container_data_types_object}{Object}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*object\ sub\ foo(*object\ obj)\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ obj;}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_classname_type_or_nothing}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}$<$classname$>$}{*<classname>}}\label{data_type_declarations_classname_type_or_nothing}
{\bfseries{\texorpdfstring{$\ast$}{*}\texorpdfstring{$<$}{<}classname\texorpdfstring{$>$}{>} Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}}{\itshape any class name} &\doxysectlink{container_data_types_object}{Object}{1} of the particular class given, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{container_data_types_object}{Object}{1} of the particular class given or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to objects of the particular class given or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; subclasses are also accepted; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*Mutex\ m)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_null_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}null}{*null}}\label{data_type_declarations_null_or_nothing_type}
{\bfseries{null Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily null}  &\doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_null}{NULL}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to Qore\textquotesingle{}s \doxysectlink{basic_data_types_null}{NULL}{1} and \doxysectlink{basic_data_types_nothing}{NOTHING}{1} types; this type has few (if any) practical applications and has been included for completeness\textquotesingle{} sake  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#\ I\ don't\ know\ if\ this\ type\ has\ any\ useful/practical\ applications...}}
\DoxyCodeLine{*null\ n\ =\ NULL;}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_data_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}date}{*date}}\label{data_type_declarations_data_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}data Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}data}  &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_binary}{Binary}{1}, and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*data\ d)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_code_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}code}{*code}}\label{data_type_declarations_code_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}code Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}code}  &\doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to \doxysectlink{expressions_closure}{Closures}{1}, \doxysectlink{expressions_call_reference}{Call References}{1}, and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*code\ c)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_timeout_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}timeout}{*timeout}}\label{data_type_declarations_timeout_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}timeout Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}timeout}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*timeout\ c)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
Assigned variables of this type return integers where a single unit equals one millisecond; when an integer is converted to a date/time value, it is converted with a single unit equalling one second, therefore unexpected values can result when performing arithmetic operations with these values. Qore handles simple addition and subtraction correctly with mixed date/time values and timeout variables when the variable is used directly in the operation, but other operations will most likely not produce the expected results. It\textquotesingle{}s recommended to avoid doing direct arithmetic with timeout values for this reason.
\end{DoxyNote}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_reference_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}reference}{*reference}}\label{data_type_declarations_reference_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}reference Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily reference}  &\doxylink{lvalue_references}{References}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &the type the reference points to &Requires a reference to an lvalue to be assigned or \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*reference\ f)\ \{}
\DoxyCodeLine{\ \ \ \ f\ =\ 10;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{int\ i;}
\DoxyCodeLine{foo(\(\backslash\)i);}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_reference_complex_or_nothing_type}{}\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}reference$<$...$>$}{*reference<...>}}\label{data_type_declarations_reference_complex_or_nothing_type}
{\bfseries{complex Reference or Nothing Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}reference\texorpdfstring{$<$}{<}...\texorpdfstring{$>$}{>}} &\doxylink{lvalue_references}{References}, \doxysectlink{basic_data_types_null}{NULL}{1}, or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &the type given as an argument and \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Restricts values to references to lvalues compatible with the given type and \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; if \doxysectlink{basic_data_types_null}{NULL}{1} is passed then \doxysectlink{basic_data_types_nothing}{NOTHING}{1} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*reference<int>\ f)\ \{}
\DoxyCodeLine{\ \ \ \ f\ =\ 10;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{int\ i;}
\DoxyCodeLine{foo(\(\backslash\)i);}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softint_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softint}{*softint}}\label{data_type_declarations_softint_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softint Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softint}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_integer}{Integer}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/integer values to an integer and returns the integer; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*softint\ i)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softfloat_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softfloat}{*softfloat}}\label{data_type_declarations_softfloat_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softfloat Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softfloat}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_float}{Float}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/float values to a float and returns the float; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*softfloat\ f)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softnumber_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softnumber}{*softnumber}}\label{data_type_declarations_softnumber_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softnumber Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softnumber}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_number}{Number}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/number values to a number and returns the number; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*softnumber\ n)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the \texorpdfstring{$\ast$}{*}softnumber type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softbool_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softbool}{*softbool}}\label{data_type_declarations_softbool_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softbool Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softbool}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_boolean}{Boolean}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/boolean values to a boolean and returns the boolean; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*softbool\ b)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softstring_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softstring}{*softstring}}\label{data_type_declarations_softstring_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softstring Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softstring}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/string values to a string and returns the string; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*softstring\ str)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softdate_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softdate}{*softdate}}\label{data_type_declarations_softdate_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softdate Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softdate}  &\doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, \doxysectlink{basic_data_types_null}{NULL}{1}, \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &\doxysectlink{basic_data_types_string}{String}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts \doxysectlink{basic_data_types_integer}{Integer}{1}, \doxysectlink{basic_data_types_float}{Float}{1}, \doxysectlink{basic_data_types_number}{Number}{1}, \doxysectlink{basic_data_types_boolean}{Boolean}{1}, \doxysectlink{basic_data_types_string}{String}{1}, \doxysectlink{basic_data_types_date}{Date}{1}, and \doxysectlink{basic_data_types_null}{NULL}{1} values and converts non-\/date values to a date and returns the date; also accepts \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} and returns \doxysectlink{basic_data_types_nothing}{NOTHING}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{sub\ foo(*softdate\ d)\ \{}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_softlist_or_nothing_type}{}\doxysubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softlist}{*softlist}}\label{data_type_declarations_softlist_or_nothing_type}
{\bfseries{\texorpdfstring{$\ast$}{*}softlist Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softlist}  &all data types &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts all data types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} are returned as \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; a list is returned unchanged, and any other type is returned as the first element of a new list  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*softlist\ d\ =\ v;}

\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_softlist_complex_or_nothing_type}{}\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\ast$}{*}softlist$<$...$>$}{*softlist<...>}}\label{data_type_declarations_softlist_complex_or_nothing_type}
{\bfseries{Complex Softlist or Nothing Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily \texorpdfstring{$\ast$}{*}softlist}  &all data types &\doxysectlink{container_data_types_list}{List}{1} or \doxysectlink{basic_data_types_nothing}{NOTHING}{1} &Accepts all data types; \doxysectlink{basic_data_types_nothing}{NOTHING}{1} and \doxysectlink{basic_data_types_null}{NULL}{1} are returned as \doxysectlink{basic_data_types_nothing}{NOTHING}{1}; a list is returned with its elements processed by the declared subtype, and any other type is returned as the first element of a new list with its element processed by the declared subtype  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{*softlist<softint>\ sub\ foo()\ \{}
\DoxyCodeLine{\ \ \ \ \textcolor{comment}{\#\ returns\ a\ list\ with\ 2\ as\ the\ first\ element}}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{stringliteral}{"{}2"{}};}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+3 introduced the \texorpdfstring{$\ast$}{*}softlist type
\end{DoxySince}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_any_type}{}\doxysubsection{\texorpdfstring{any}{any}}\label{data_type_declarations_any_type}
{\bfseries{any Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily any}  &all data types &all data types &Provides no restrictions on the type of value it receives and returns the same value, however complex type information is stripped on assignment for backwards compatibility  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{any\ v\ =\ bar;}
\DoxyCodeLine{any\ l\ =\ (1,\ 2);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}list"{}\ as\ the\ complex\ type\ info\ is\ stripped\ on\ assignment\ for\ backwards\ compatibility}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ l.fullType());}

\end{DoxyCode}

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

\begin{DoxyItemize}
\item The {\ttfamily any} type restriction is the same as using no type restriction
\item To assign any type without stripping complex types, use the \doxysectlink{data_type_declarations_auto_type}{auto}{1} type restriction instead
\item In general \doxysectlink{data_type_declarations_auto_type}{auto}{1} is recommended over {\ttfamily any} 
\end{DoxyItemize}
\end{DoxyNote}
\DoxyHorRuler{0}
 \hypertarget{data_type_declarations_auto_type}{}\doxysubsection{\texorpdfstring{auto}{auto}}\label{data_type_declarations_auto_type}
{\bfseries{auto Type Restriction}}  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
{\bfseries{Name}} &{\bfseries{Accepts Qore Type(s)}} &{\bfseries{Returns Qore Type(s)}} &{\bfseries{Description}}  \\\cline{1-4}
{\ttfamily auto}  &all data types &all data types &Provides no restrictions on the type of value it receives and returns the same value; does not strip complex types on assignment like \doxysectlink{data_type_declarations_any_type}{any}{1}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{auto\ v\ =\ bar;}
\DoxyCodeLine{auto\ l\ =\ (1,\ 2);}
\DoxyCodeLine{\textcolor{comment}{\#\ prints\ "{}list<int>"{}}}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ l.fullType());}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyItemize}
\item In general {\ttfamily auto} is recommended over \doxysectlink{data_type_declarations_any_type}{any}{1} 
\end{DoxyItemize}