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{}$\ast$classname\textquotesingle{}} (i.\+e. an asterix followed by the class name), meaning either the given class or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} (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}
\mbox{\hyperlink{data_type_declarations_int_type}{int}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &Restricts values \mbox{\hyperlink{basic_data_types_integer}{Integer}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_float_type}{float}} &\mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_integer}{Integer}} &\mbox{\hyperlink{basic_data_types_float}{Float}} &Restricts values to \mbox{\hyperlink{basic_data_types_float}{Float}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_number_type}{number}} &\mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, or \mbox{\hyperlink{basic_data_types_integer}{Integer}} &\mbox{\hyperlink{basic_data_types_number}{Number}} &Restricts values to \mbox{\hyperlink{basic_data_types_number}{Number}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_bool_type}{bool}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &Restricts values to \mbox{\hyperlink{basic_data_types_boolean}{Boolean}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_string_type}{string}} &\mbox{\hyperlink{basic_data_types_string}{String}} &\mbox{\hyperlink{basic_data_types_string}{String}} &Restricts values to \mbox{\hyperlink{basic_data_types_string}{String}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_date_type}{date}} &\mbox{\hyperlink{basic_data_types_date}{Date}} &\mbox{\hyperlink{basic_data_types_date}{Date}} &Restricts values to \mbox{\hyperlink{basic_data_types_date}{Date}} values; values may be either \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute}} or \mbox{\hyperlink{basic_data_types_relative_dates}{relative}}  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_binary_type}{binary}} &\mbox{\hyperlink{basic_data_types_binary}{Binary}} &\mbox{\hyperlink{basic_data_types_binary}{Binary}} &Restricts values to \mbox{\hyperlink{basic_data_types_binary}{Binary}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_hash_type}{hash}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} &Restricts values to \mbox{\hyperlink{container_data_types_hash}{Hash}} values without any key type information  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_hash_hashdecl_type}{hash$<$...$>$}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} &Restricts values to values of the referenced \mbox{\hyperlink{hashdecl}{type-\/safe hash}}  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_hash_complex_type}{hash$<$string, ...$>$}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} &Restricts key values to the declared type  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_list_type}{list}} &\mbox{\hyperlink{container_data_types_list}{List}} &\mbox{\hyperlink{container_data_types_list}{List}} &Restricts values to \mbox{\hyperlink{container_data_types_list}{List}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_list_complex_type}{list$<$...$>$}} &\mbox{\hyperlink{container_data_types_list}{List}} &\mbox{\hyperlink{container_data_types_list}{List}} &Restricts list values to the declared type  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_object_type}{object}} &\mbox{\hyperlink{container_data_types_object}{Object}} &\mbox{\hyperlink{container_data_types_object}{Object}} &Restricts values to \mbox{\hyperlink{container_data_types_object}{Object}} values  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_classname_type}{object$<$...$>$}} &\mbox{\hyperlink{container_data_types_object}{Object}} &\mbox{\hyperlink{container_data_types_object}{Object}} &Restricts values to objects of the specific class  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_classname_type}{$<$classname$>$}} &\mbox{\hyperlink{container_data_types_object}{Object}} &\mbox{\hyperlink{container_data_types_object}{Object}} &Restricts values to objects of the specific class given; either the class name can be given (ex\+: \mbox{\hyperlink{class_qore_1_1_thread_1_1_mutex}{Mutex}} or a qualified path to the class\+: \mbox{\hyperlink{class_qore_1_1_thread_1_1_mutex}{Qore\+::\+Thread\+::\+Mutex}})  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_null_type}{null}} &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} type; this type has few (if any) practical applications and has been included for completeness\textquotesingle{} sake  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_nothing_type}{nothing}} &\mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} type; this type is mostly useful for declaring that a function or method returns no value  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_timeout_type}{timeout}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}} and converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softint_type}{softint}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/integer values to an integer and returns the integer  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softfloat_type}{softfloat}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_float}{Float}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/float values to a float and returns the new value  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softnumber_type}{softnumber}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_float}{Float}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/number values to a float and returns the new value  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softbool_type}{softbool}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/boolean values to a boolean and returns the new value  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softstring_type}{softstring}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_string}{String}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/string values to a string and returns the new value  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softdate_type}{softdate}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_date}{Date}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/date values to a date and returns the new value  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softlist_type}{softlist}} &all types &\mbox{\hyperlink{container_data_types_list}{List}} &Accepts all types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} 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}
\mbox{\hyperlink{data_type_declarations_softlist_complex_type}{softlist$<$...$>$}} &all types &\mbox{\hyperlink{container_data_types_list}{List}} &Accepts all data types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} 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}
\mbox{\hyperlink{data_type_declarations_data_type}{data}} &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_binary}{Binary}} &same as received &Restricts input to \mbox{\hyperlink{basic_data_types_string}{String}} and \mbox{\hyperlink{basic_data_types_binary}{Binary}} and returns the same type  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_code_type}{code}} &\mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}} &same as received &Restricts values to \mbox{\hyperlink{expressions_closure}{closures}} and \mbox{\hyperlink{expressions_call_reference}{call references}}  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_reference_type}{reference}} &\mbox{\hyperlink{lvalue_references}{References}} &the type the reference points to &Restricts values to references to lvalues  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_reference_complex_type}{reference$<$...$>$}} &\mbox{\hyperlink{lvalue_references}{References}} &the type given as an argument &Restricts values to references to lvalues compatible with the given type  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_int_or_nothing_type}{$\ast$int}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_float_or_nothing_type}{$\ast$float}} &\mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_number_or_nothing_type}{$\ast$number}} &\mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_number}{Number}} or \mbox{\hyperlink{basic_data_types_number}{Number}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_number}{Number}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_bool_or_nothing_type}{$\ast$bool}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_boolean}{Boolean}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_string_or_nothing_type}{$\ast$string}} &\mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_date_or_nothing_type}{$\ast$date}} &\mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_date}{Date}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_date}{Date}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} type; values may be either absolute or relative date/time values; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_binary_or_nothing_type}{$\ast$binary}} &\mbox{\hyperlink{basic_data_types_binary}{Binary}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_binary}{Binary}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_binary}{Binary}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_hash_or_nothing_type}{$\ast$hash}} &\mbox{\hyperlink{container_data_types_hash}{Hash}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_hash_hashdecl_or_nothing_type}{$\ast$hash$<$...$>$}} &\mbox{\hyperlink{container_data_types_hash}{Hash}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to values of the referenced \mbox{\hyperlink{hashdecl}{type-\/safe hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_hash_complex_or_nothing_type}{$\ast$hash$<$string, ...$>$}} &\mbox{\hyperlink{container_data_types_hash}{Hash}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts key values to the declared complex hash or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_list_or_nothing_type}{$\ast$list}} &\mbox{\hyperlink{container_data_types_list}{List}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts either a \mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_list_complex_or_nothing_type}{$\ast$list$<$...$>$}} &\mbox{\hyperlink{container_data_types_list}{List}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts list values to the declared complex list type or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_object_or_nothing_type}{$\ast$object}} &\mbox{\hyperlink{container_data_types_object}{Object}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_object}{Object}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts either an \mbox{\hyperlink{container_data_types_object}{Object}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_classname_type_or_nothing}{$\ast$$<$classname$>$}} &\mbox{\hyperlink{container_data_types_object}{Object}} of the given class, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_object}{Object}} of the given class or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to objects of the specific class given or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; either the class name can be given (ex\+: \mbox{\hyperlink{class_qore_1_1_thread_1_1_mutex}{$\ast$\+Mutex}} or a qualified path to the class\+: \mbox{\hyperlink{class_qore_1_1_thread_1_1_mutex}{$\ast$\+Qore\+:\+:Thread\+:\+:Mutex}}); if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_classname_type_or_nothing}{$\ast$object$<$...$>$}} &\mbox{\hyperlink{container_data_types_object}{Object}} of the given class, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_object}{Object}} of the given class or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to objects of the specific class given or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_null_or_nothing_type}{$\ast$null}} &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts input to \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and returns the same type  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_data_or_nothing_type}{$\ast$data}} &\mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_binary}{Binary}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_binary}{Binary}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts input to \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_binary}{Binary}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and returns the same type; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_code_or_nothing_type}{$\ast$code}} &\mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{expressions_closure}{closures}}, \mbox{\hyperlink{expressions_call_reference}{call references}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_timeout_or_nothing_type}{$\ast$timeout}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}} and converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_reference_or_nothing_type}{$\ast$reference}} &\mbox{\hyperlink{lvalue_references}{References}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &the type the reference points to and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to references to lvalues and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_reference_complex_or_nothing_type}{$\ast$reference$<$...$>$}} &\mbox{\hyperlink{lvalue_references}{References}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &the type given as an argument and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to references to lvalues compatible with the given type and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softint_or_nothing_type}{$\ast$softint}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/integer values to an integer and returns the integer. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softfloat_or_nothing_type}{$\ast$softfloat}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/float values to a float and returns the new value. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softnumber_or_nothing_type}{$\ast$softnumber}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_number}{Number}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/number values to a number and returns the new value. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softbool_or_nothing_type}{$\ast$softbool}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/boolean values to a boolean and returns the new value. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softstring_or_nothing_type}{$\ast$softstring}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/string values to a string and returns the new value. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softdate_or_nothing_type}{$\ast$softdate}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_date}{Date}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and converts non-\/date values to a date and returns the new value. If no value or \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed, then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softlist_or_nothing_type}{$\ast$softlist}} &all types &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts all types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and list values are returned as the same value; \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is returned as \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}, any other type is returned as the first element of a new list  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_softlist_complex_or_nothing_type}{$\ast$softlist$<$...$>$}} &all types &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts all data types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} are returned as \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; 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}
\mbox{\hyperlink{data_type_declarations_any_type}{any}} &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 \mbox{\hyperlink{data_type_declarations_auto_type}{auto}} type restriction instead  \\\cline{1-4}
\mbox{\hyperlink{data_type_declarations_auto_type}{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 \mbox{\hyperlink{data_type_declarations_any_type}{any}}  \\\cline{1-4}
\end{longtabu}




 \hypertarget{data_type_declarations_int_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_integer}{Integer}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_float_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_integer}{Integer}} &\mbox{\hyperlink{basic_data_types_float}{Float}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_float}{Float}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_number_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, or \mbox{\hyperlink{basic_data_types_integer}{Integer}} &\mbox{\hyperlink{basic_data_types_number}{Number}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_number}{Number}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the number type
\end{DoxySince}


 \hypertarget{data_type_declarations_bool_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_boolean}{Boolean}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_string_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_string}{String}} &\mbox{\hyperlink{basic_data_types_string}{String}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_string}{String}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_date_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_date}{Date}} &\mbox{\hyperlink{basic_data_types_date}{Date}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_date}{Date}} type; date/time values can be either \mbox{\hyperlink{basic_data_types_absolute_dates}{absolute}} or \mbox{\hyperlink{basic_data_types_relative_dates}{relative}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}
date sub foo(date d = \mbox{\hyperlink{group__date__and__time__functions_ga61b29a943e0e85abdc9792a9434e5b39}{now\_us}}()) \{
    \textcolor{keywordflow}{return} d;
\}
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_binary_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_binary}{Binary}} &\mbox{\hyperlink{basic_data_types_binary}{Binary}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_binary}{Binary}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_hash_type}{}\section{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}  &\mbox{\hyperlink{container_data_types_hash}{Hash}} (all) &\mbox{\hyperlink{container_data_types_hash}{Hash}} (untyped) &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{container_data_types_hash}{Hash}} 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}
hash sub foo(hash h = (\textcolor{stringliteral}{"foo"}: \textcolor{stringliteral}{"bar"}, \textcolor{stringliteral}{"x"}: 2)) \{
    \textcolor{keywordflow}{return} h;
\}
\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_hash_hashdecl_type}{}\subsection{Type-\/\+Safe Hash Type}\label{data_type_declarations_hash_hashdecl_type}
{\bfseries \mbox{\hyperlink{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}  &\mbox{\hyperlink{container_data_types_hash}{hash}}$<${\itshape \mbox{\hyperlink{hashdecl}{hashdecl}}$>$} &\mbox{\hyperlink{container_data_types_hash}{hash}}$<${\itshape \mbox{\hyperlink{hashdecl}{hashdecl}}$>$}$>$ &Restricts values to hashes created from the given \mbox{\hyperlink{hashdecl}{hashdecl}}  \\\cline{1-4}
\end{longtabu}


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

\begin{DoxyParagraph}{Examples}

\begin{DoxyCode}
\textcolor{comment}{# hashdecl typed hash declaration}
hashdecl MyHash \{
    string foo = \textcolor{stringliteral}{"empty"};
    int x = 1;
\}

\textcolor{comment}{# declaration and initialization to default key values}
hash<MyHash> h1();

\textcolor{comment}{# declaration and initialization with explicit values}
hash<MyHash> h2((\textcolor{stringliteral}{"foo"}: \textcolor{stringliteral}{"string"}, \textcolor{stringliteral}{"x"}: 10));

\textcolor{comment}{# declaration and initialization with the new operator}
hash<MyHash> h3 = new hash<MyHash>((\textcolor{stringliteral}{"foo"}: \textcolor{stringliteral}{"string"}, \textcolor{stringliteral}{"x"}: 10));

\textcolor{comment}{# example of a function with a typed hash return type and parameter type}
hash<MyHash> sub foo(hash<MyHash> h = new hash<MyHash>(\textcolor{stringliteral}{"foo"}: \textcolor{stringliteral}{"bar"}, \textcolor{stringliteral}{"x"}: 2)) \{
    \textcolor{keywordflow}{return} h;
\}

\textcolor{comment}{# example of a function with a typed hash return type and a cast to a typed hash return type}
hash<MyHash> sub foo(int x) \{
    \textcolor{keywordflow}{return} cast<hash<MyHash>>(get\_hash(x));
\}
\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 \mbox{\hyperlink{data_type_declarations_hash_type}{hash}} lvalue, use \mbox{\hyperlink{operators_cast}{cast$<$hash$>$(...)}} on the value, call the \mbox{\hyperlink{group__type__conversion__functions_ga5182bb860e3837e1eb337e85a9b3ebd6}{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 \char`\"{}auto\char`\"{}}, allows for the lvalue to maintain the complex hash type as in the following example\+: 
\begin{DoxyCode}
hash h0 = (\textcolor{stringliteral}{"a"}: 2, \textcolor{stringliteral}{"b"}: 3);
\textcolor{comment}{# prints "hash"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, h0.fullType());
hash<auto> h1 = new hash<MyHash>();
\textcolor{comment}{# prints "hash<MyHash>"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, h1.fullType());
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{hashdecl}{Hashdecl\+: Type-\/\+Safe Hash Declarations}}
\item \mbox{\hyperlink{operators_new}{New Value Operator (new)}}
\item \mbox{\hyperlink{operators_cast}{Cast Operator (cast$<$$>$())}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\hypertarget{data_type_declarations_hash_complex_type}{}\subsection{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}  &\mbox{\hyperlink{container_data_types_hash}{hash}}$<$string, {\itshape \mbox{\hyperlink{data_type_declarations}{type}}}$>$ &\mbox{\hyperlink{container_data_types_hash}{hash}}$<$string, {\itshape \mbox{\hyperlink{data_type_declarations}{type}}}$>$ &Restricts values to hashes with the given declared key type; use \mbox{\hyperlink{operators_cast}{cast$<$$>$(...)}} 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 \mbox{\hyperlink{data_type_declarations_string_type}{string}}. 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}
\textcolor{comment}{# 1: declaration and initialization (identical to 2 and 3)}
hash<string, int> h1((
    \textcolor{stringliteral}{"code"}: 500,
    \textcolor{stringliteral}{"type"}: 300,
    \textcolor{stringliteral}{"value"}: 0,
));

\textcolor{comment}{# 2: declaration and initialization with the assignment operator (identical to 1 and 3)}
hash<string, int> h2 = (
    \textcolor{stringliteral}{"code"}: 500,
    \textcolor{stringliteral}{"type"}: 300,
    \textcolor{stringliteral}{"value"}: 0,
);

\textcolor{comment}{# 3: declaration and initialization with the new operator (identical to 1 and 2)}
hash<string, int> h3 = new hash<string, int>((
    \textcolor{stringliteral}{"code"}: 500,
    \textcolor{stringliteral}{"type"}: 300,
    \textcolor{stringliteral}{"value"}: 0,
));

\textcolor{comment}{# assignment from an untyped hash with the cast<> operator (can result in runtime type errors)}
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 \mbox{\hyperlink{data_type_declarations_hash_type}{hash}} lvalue, use \mbox{\hyperlink{operators_cast}{cast$<$hash$>$(...)}} on the value, call the \mbox{\hyperlink{group__type__conversion__functions_ga5182bb860e3837e1eb337e85a9b3ebd6}{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 \char`\"{}auto\char`\"{}}, allows for the lvalue to maintain the complex hash type as in the following example\+: 
\begin{DoxyCode}
hash h0 = (\textcolor{stringliteral}{"a"}: 2, \textcolor{stringliteral}{"b"}: 3);
\textcolor{comment}{# prints "hash"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, h0.fullType());
hash<auto> h1 = (\textcolor{stringliteral}{"a"}: 2, \textcolor{stringliteral}{"b"}: 3);
\textcolor{comment}{# prints "hash<string, int>"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, h1.fullType());
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{hashdecl}{Hashdecl\+: Type-\/\+Safe Hash Declarations}}
\item \mbox{\hyperlink{operators_new}{New Value Operator (new)}}
\item \mbox{\hyperlink{operators_cast}{Cast Operator (cast$<$$>$())}}
\end{DoxyItemize}
\end{DoxySeeAlso}


 \hypertarget{data_type_declarations_list_type}{}\section{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}  &\mbox{\hyperlink{container_data_types_list}{List}} &\mbox{\hyperlink{container_data_types_list}{List}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{container_data_types_list}{List}} type  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\hypertarget{data_type_declarations_list_complex_type}{}\subsection{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}  &\mbox{\hyperlink{container_data_types_list}{list}}$<${\itshape \mbox{\hyperlink{data_type_declarations}{type}}}$>$ &\mbox{\hyperlink{container_data_types_list}{list}}$<${\itshape \mbox{\hyperlink{data_type_declarations}{type}}}$>$ &Restricts values to lists with the given declared value type; use \mbox{\hyperlink{operators_cast}{cast$<$$>$(...)}} 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}
\textcolor{comment}{# 1: declaration and initialization (identical to 2 and 3)}
list<int> l1(500, 300, 0);

\textcolor{comment}{# 2: declaration and initialization with the assignment operator (identical to 1 and 3)}
list<int> l2 = (500, 300, 0);

\textcolor{comment}{# 3: declaration and initialization with the new operator (identical to 1 and 2)}
list<int> l3 = new list<int>(500, 300, 0);

\textcolor{comment}{# assignment from an untyped list with the cast<> operator (can result in runtime type errors)}
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 \mbox{\hyperlink{data_type_declarations_list_type}{list}} lvalue, use \mbox{\hyperlink{operators_cast}{cast$<$list$>$(...)}} on the value, call the \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{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 \char`\"{}auto\char`\"{}}, allows for the lvalue to maintain the complex list type as in the following example\+: 
\begin{DoxyCode}
list l0 = (2, 3);
\textcolor{comment}{# prints "list"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, l0.fullType());
list<auto> l1 = (2, 3);
\textcolor{comment}{# prints "list<int>"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, l1.fullType());
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{operators_new}{New Value Operator (new)}}
\item \mbox{\hyperlink{operators_cast}{Cast Operator (cast$<$$>$())}}
\end{DoxyItemize}
\end{DoxySeeAlso}


 \hypertarget{data_type_declarations_object_type}{}\section{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}  &\mbox{\hyperlink{container_data_types_object}{Object}} &\mbox{\hyperlink{container_data_types_object}{Object}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{container_data_types_object}{Object}} 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}
object sub foo(object o = new Mutex()) \{
    \textcolor{keywordflow}{return} o;
\}
\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_object_complex_type}{}\subsection{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}  &\mbox{\hyperlink{container_data_types_object}{object}}$<${\itshape \mbox{\hyperlink{qore_classes}{class}}}$>$ &\mbox{\hyperlink{container_data_types_object}{object}}$<${\itshape \mbox{\hyperlink{qore_classes}{class}}}$>$ &Restricts values to objects of the given class  \\\cline{1-4}
\end{longtabu}


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

\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
this type declaration is equivalent to using the class name by itself
\end{DoxyNote}


 \hypertarget{data_type_declarations_classname_type}{}\section{$<$classname$>$}\label{data_type_declarations_classname_type}
{\bfseries $<$classname$>$ 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} &\mbox{\hyperlink{container_data_types_object}{Object}} of the particular class given &\mbox{\hyperlink{container_data_types_object}{Object}} 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}
Mutex sub foo(Qore::Thread::Mutex m = new Mutex()) \{
    \textcolor{keywordflow}{return} m;
\}
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_null_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} 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}
\textcolor{comment}{# I don't know if this type has any useful/practical applications...}
null n = NULL;
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_nothing_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} 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}
nothing sub bar() \{
    \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"foo\(\backslash\)n"});
\}
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_timeout_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}} 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}
timeout sub foo(timeout to = 1250ms) \{
    \textcolor{keywordflow}{return} to;
\}
\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}


 \hypertarget{data_type_declarations_softint_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/integer values to an integer and returns the integer  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softfloat_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_float}{Float}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/float values to a float and returns the float  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softnumber_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_float}{Float}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/number values to a number and returns the number  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the softnumber type
\end{DoxySince}


 \hypertarget{data_type_declarations_softbool_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/boolean values to a boolean and returns the boolean  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softstring_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_string}{String}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/string values to a string and returns the string  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}
softstring str = 200;
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softdate_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} &\mbox{\hyperlink{basic_data_types_date}{Date}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/date values to a date and returns the date  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softlist_type}{}\section{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 &\mbox{\hyperlink{container_data_types_list}{List}} &Accepts all data types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} 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}
softlist sub foo(softlist l) \{
    foreach any element \textcolor{keywordflow}{in} (\(\backslash\)l) \{
    \}
    \textcolor{keywordflow}{return} l;
\}
\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_softlist_complex_type}{}\subsection{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 &\mbox{\hyperlink{container_data_types_list}{List}} &Accepts all data types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} 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}
\textcolor{comment}{# 1: declaration and initialization (identical to 2 and 3)}
softlist<int> l1(500, 300, 0);

\textcolor{comment}{# 2: declaration and initialization with the assignment operator (identical to 1 and 3)}
softlist<int> l2 = (500, 300, 0);

\textcolor{comment}{# 3: declaration and initialization with the new operator (identical to 1 and 2)}
softlist<int> l3 = new list<int>(500, 300, 0);

\textcolor{comment}{# assignment from an untyped list with the cast<> operator (can result in runtime type errors)}
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 \mbox{\hyperlink{data_type_declarations_list_type}{list}} lvalue, use \mbox{\hyperlink{operators_cast}{cast$<$list$>$(...)}} on the value, call the \mbox{\hyperlink{group__type__conversion__functions_ga8f596b49953b71928f04c24b19834bc3}{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 \char`\"{}auto\char`\"{}}, allows for the lvalue to maintain the complex list type as in the following example\+: 
\begin{DoxyCode}
softlist l0 = 1;
\textcolor{comment}{# prints "list"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, l0.fullType());
softlist<auto> l1 = (1, );
\textcolor{comment}{# prints "list<int>"}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"%y\(\backslash\)n"}, l1.fullType());
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{operators_new}{New Value Operator (new)}}
\item \mbox{\hyperlink{operators_cast}{Cast Operator (cast$<$$>$())}}
\end{DoxyItemize}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+3 introduced the softlist type
\end{DoxySince}


 \hypertarget{data_type_declarations_data_type}{}\section{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}  &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_binary}{Binary}} &same as received &Restricts values to \mbox{\hyperlink{basic_data_types_string}{String}} and \mbox{\hyperlink{basic_data_types_binary}{Binary}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_code_type}{}\section{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}  &\mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}} &same as received &Restricts values to \mbox{\hyperlink{expressions_closure}{Closures}} and \mbox{\hyperlink{expressions_call_reference}{Call References}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
that also {\ttfamily \char`\"{}closure\char`\"{}} and {\ttfamily \char`\"{}callref\char`\"{}} are accepted as synonyms for {\ttfamily \char`\"{}code\char`\"{}} (they are not more specific than {\ttfamily \char`\"{}code\char`\"{}} but rather provide identical type restrictions)
\end{DoxyNote}


 \hypertarget{data_type_declarations_reference_type}{}\section{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}  &\mbox{\hyperlink{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}
sub foo(reference f) \{
    f = 10;
\}

int i;
foo(\(\backslash\)i);
\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_reference_complex_type}{}\subsection{Reference With Declared L\+Value 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}  &\mbox{\hyperlink{lvalue_references}{reference}}$<${\itshape \mbox{\hyperlink{data_type_declarations}{type}}}$>$ &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}
int i = 0;
reference<int> r = \(\backslash\)i;
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_int_or_nothing_type}{}\section{$\ast$int}\label{data_type_declarations_int_or_nothing_type}
{\bfseries $\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 $\ast$int}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_integer}{Integer}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_float_or_nothing_type}{}\section{$\ast$float}\label{data_type_declarations_float_or_nothing_type}
{\bfseries $\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 $\ast$float}  &\mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_float}{Float}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_number_or_nothing_type}{}\section{$\ast$number}\label{data_type_declarations_number_or_nothing_type}
{\bfseries $\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 $\ast$number}  &\mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_number}{Number}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_number}{Number}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the $\ast$number type
\end{DoxySince}


 \hypertarget{data_type_declarations_bool_or_nothing_type}{}\section{$\ast$bool}\label{data_type_declarations_bool_or_nothing_type}
{\bfseries $\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 $\ast$bool}  &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_boolean}{Boolean}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_string_or_nothing_type}{}\section{$\ast$string}\label{data_type_declarations_string_or_nothing_type}
{\bfseries $\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 $\ast$string}  &\mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_string}{String}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_date_or_nothing_type}{}\section{$\ast$date}\label{data_type_declarations_date_or_nothing_type}
{\bfseries $\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 $\ast$date}  &\mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_date}{Date}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_date}{Date}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_binary_or_nothing_type}{}\section{$\ast$binary}\label{data_type_declarations_binary_or_nothing_type}
{\bfseries $\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 $\ast$binary}  &\mbox{\hyperlink{basic_data_types_binary}{Binary}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_binary}{Binary}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_binary}{Binary}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_hash_or_nothing_type}{}\section{$\ast$hash}\label{data_type_declarations_hash_or_nothing_type}
{\bfseries $\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 $\ast$hash}  &\mbox{\hyperlink{container_data_types_hash}{Hash}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{container_data_types_hash}{Hash}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\hypertarget{data_type_declarations_hash_hashdecl_or_nothing_type}{}\subsection{$\ast$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 $\ast$hash$<$...$>$} &\mbox{\hyperlink{container_data_types_hash}{Hash}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to values of the referenced \mbox{\hyperlink{hashdecl}{type-\/safe hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\hypertarget{data_type_declarations_hash_complex_or_nothing_type}{}\subsection{$\ast$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 $\ast$hash$<$string, ...$>$} &\mbox{\hyperlink{container_data_types_hash}{Hash}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_hash}{Hash}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts key values to the declared complex hash or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} types; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_list_or_nothing_type}{}\section{$\ast$list}\label{data_type_declarations_list_or_nothing_type}
{\bfseries $\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 $\ast$list}  &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{container_data_types_list}{List}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\hypertarget{data_type_declarations_list_complex_or_nothing_type}{}\subsection{$\ast$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 $\ast$list$<$...$>$} &\mbox{\hyperlink{container_data_types_list}{List}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts list values to the declared complex list type or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_object_or_nothing_type}{}\section{$\ast$object}\label{data_type_declarations_object_or_nothing_type}
{\bfseries $\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 $\ast$list}  &\mbox{\hyperlink{container_data_types_object}{Object}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_object}{Object}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{container_data_types_object}{Object}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_classname_type_or_nothing}{}\section{$\ast$$<$classname$>$}\label{data_type_declarations_classname_type_or_nothing}
{\bfseries $\ast$$<$classname$>$ 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 $\ast$}{\itshape any class name} &\mbox{\hyperlink{container_data_types_object}{Object}} of the particular class given, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{container_data_types_object}{Object}} of the particular class given or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to objects of the particular class given or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; subclasses are also accepted; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_null_or_nothing_type}{}\section{$\ast$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}  &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to Qore\textquotesingle{}s \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} 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}
\textcolor{comment}{# I don't know if this type has any useful/practical applications...}
*null n = NULL;
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_data_or_nothing_type}{}\section{$\ast$date}\label{data_type_declarations_data_or_nothing_type}
{\bfseries $\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 $\ast$data}  &\mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_binary}{Binary}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_binary}{Binary}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_binary}{Binary}}, and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_code_or_nothing_type}{}\section{$\ast$code}\label{data_type_declarations_code_or_nothing_type}
{\bfseries $\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 $\ast$code}  &\mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to \mbox{\hyperlink{expressions_closure}{Closures}}, \mbox{\hyperlink{expressions_call_reference}{Call References}}, and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_timeout_or_nothing_type}{}\section{$\ast$timeout}\label{data_type_declarations_timeout_or_nothing_type}
{\bfseries $\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 $\ast$timeout}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &converts dates to an integer value representing milliseconds and returns the integer; incoming integers are assumed to represent milliseconds; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}
sub foo(*timeout c) \{
\}
\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}


 \hypertarget{data_type_declarations_reference_or_nothing_type}{}\section{$\ast$reference}\label{data_type_declarations_reference_or_nothing_type}
{\bfseries $\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}  &\mbox{\hyperlink{lvalue_references}{References}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &the type the reference points to &Requires a reference to an lvalue to be assigned or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

\begin{DoxyCode}
sub foo(*reference f) \{
    f = 10;
\}

int i;
foo(\(\backslash\)i);
\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_reference_complex_or_nothing_type}{}\subsection{$\ast$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 $\ast$reference$<$...$>$} &\mbox{\hyperlink{lvalue_references}{References}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &the type given as an argument and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Restricts values to references to lvalues compatible with the given type and \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; if \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} is passed then \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} is returned  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

int i;
foo(\(\backslash\)i);
\end{DoxyCode}

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softint_or_nothing_type}{}\section{$\ast$softint}\label{data_type_declarations_softint_or_nothing_type}
{\bfseries $\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 $\ast$softint}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_integer}{Integer}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/integer values to an integer and returns the integer; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softfloat_or_nothing_type}{}\section{$\ast$softfloat}\label{data_type_declarations_softfloat_or_nothing_type}
{\bfseries $\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 $\ast$softfloat}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_float}{Float}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/float values to a float and returns the float; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softnumber_or_nothing_type}{}\section{$\ast$softnumber}\label{data_type_declarations_softnumber_or_nothing_type}
{\bfseries $\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 $\ast$softnumber}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_number}{Number}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/number values to a number and returns the number; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+6 introduced the $\ast$softnumber type
\end{DoxySince}


 \hypertarget{data_type_declarations_softbool_or_nothing_type}{}\section{$\ast$softbool}\label{data_type_declarations_softbool_or_nothing_type}
{\bfseries $\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 $\ast$softbool}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_boolean}{Boolean}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/boolean values to a boolean and returns the boolean; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softstring_or_nothing_type}{}\section{$\ast$softstring}\label{data_type_declarations_softstring_or_nothing_type}
{\bfseries $\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 $\ast$softstring}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/string values to a string and returns the string; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softdate_or_nothing_type}{}\section{$\ast$softdate}\label{data_type_declarations_softdate_or_nothing_type}
{\bfseries $\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 $\ast$softdate}  &\mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}}, \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &\mbox{\hyperlink{basic_data_types_string}{String}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts \mbox{\hyperlink{basic_data_types_integer}{Integer}}, \mbox{\hyperlink{basic_data_types_float}{Float}}, \mbox{\hyperlink{basic_data_types_number}{Number}}, \mbox{\hyperlink{basic_data_types_boolean}{Boolean}}, \mbox{\hyperlink{basic_data_types_string}{String}}, \mbox{\hyperlink{basic_data_types_date}{Date}}, and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} values and converts non-\/date values to a date and returns the date; also accepts \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} and returns \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}


 \hypertarget{data_type_declarations_softlist_or_nothing_type}{}\section{$\ast$softlist}\label{data_type_declarations_softlist_or_nothing_type}
{\bfseries $\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 $\ast$softlist}  &all data types &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts all data types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} are returned as \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; 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}
*softlist d = v;
\end{DoxyCode}

\end{DoxyParagraph}
\hypertarget{data_type_declarations_softlist_complex_or_nothing_type}{}\subsection{$\ast$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 $\ast$softlist}  &all data types &\mbox{\hyperlink{container_data_types_list}{List}} or \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} &Accepts all data types; \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}} and \mbox{\hyperlink{basic_data_types_null}{N\+U\+LL}} are returned as \mbox{\hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG}}; 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}
*softlist<softint> sub foo() \{
    \textcolor{comment}{# returns a list with 2 as the first element}
    \textcolor{keywordflow}{return} \textcolor{stringliteral}{"2"};
\}
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+3 introduced the $\ast$softlist type
\end{DoxySince}


 \hypertarget{data_type_declarations_any_type}{}\section{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}
any v = bar;
any l = (1, 2);
\textcolor{comment}{# prints "list" as the complex type info is stripped on assignment for backwards compatibility}
\mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{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 \mbox{\hyperlink{data_type_declarations_auto_type}{auto}} type restriction instead
\item In general \mbox{\hyperlink{data_type_declarations_auto_type}{auto}} is recommended over {\ttfamily any} 
\end{DoxyItemize}
\end{DoxyNote}


 \hypertarget{data_type_declarations_auto_type}{}\section{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 \mbox{\hyperlink{data_type_declarations_any_type}{any}}  \\\cline{1-4}
\end{longtabu}


\begin{DoxyParagraph}{Example}

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

\end{DoxyParagraph}

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