A Qore program can include other program code to be used and executed in the current program by using the \mbox{\hyperlink{parse_directives_include}{\%include}} directive. The \mbox{\hyperlink{parse_directives_include}{\%include}} directive must be the first text on the line, and the file name to include must follow. All text on the line after the \mbox{\hyperlink{parse_directives_include}{\%include}} directive will be used for the file name to include. The file name should not be quoted.

Here is an example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\#!/usr/bin/qore}}
\DoxyCodeLine{\%include /usr/qore/lib/functions.ql}
\end{DoxyCode}


After this, any variable, function, namespace, constant, or object declared in the above file can be used by the Qore program.

If such a program code (i.\+e. Some\+Class.\+qc or Some\+Funtion.\+ql) is a part of separated module (see \mbox{\hyperlink{qore_modules}{Module Description}}) it will be included automatically.

The {\ttfamily Q\+O\+R\+E\+\_\+\+I\+N\+C\+L\+U\+D\+E\+\_\+\+D\+IR} environment variable determines the search path for include files (see \mbox{\hyperlink{environment_variables}{Environment Variables}}). 