Skip to content

Inclusion Directives

Bananattack edited this page Apr 20, 2011 · 3 revisions

The Language Reference - Inclusion Directives

In the interest of keep code tidy and separated, people often split their programs into multiple source files. To include the contents of another file, use the include directive. It has the form include 'filename'.

Notes

  • Included source can see all other files, because files are merged into the program they were included from.
  • For this reason, included files need not include other files included elsewhere. Mutually recursive source files aren't possible. Instead have both files be included by an outside file to avoid cycles.

Example

include 'hardware.nel'
include 'monster.nel'