411 REFERENCE · Wikibooks
Lua Programming/include
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
The require function is used to incorporate code from an included header file.
Inclusion statements are normally placed near the top of a source file
Inclusion statements are normally placed near the top of a source file. Note that the file extension is omitted from the specified header filename:
-- Include the contents of file foobar.lua
require "foobar"