Skip to content

The Include Identifier

Raph Hennessy edited this page Nov 21, 2015 · 1 revision

Often in programming, we want to have multiple files for one project. However, the files will need to be linked when they are compiled. We do this using the inc statement in the Q Programming Language.

The inc statement is very easy to use. Unlike many languages, you don't even need to put quotes around the name of the file you are including. Just use it like shown below.

inc functions.code

Obviously you can use it with any file name. You can even include multiple files in one inc statement. For an example, look just below this line.

inc functions.code header.code footer.code;

You probably wouldn't want to include your header and footer right next to each-other, but there is no compiler-based reason that would stop you from doing so.

It is important to note that inc statements must be placed in the meta section of your Q Code or they will not compile or be registered as existing.

Clone this wiki locally