A script module represents a single TkScript source code file.
Modules can contain
declarations as well as
- global initialization statements that are run before the main() function is called.
A script project that uses more than one source file must
have a project file that lists all sources, see
Projects and TKX archives
Simple example for a project file
Each module has to be assigned a unique module name
// ---- file: myscript.tks
// ---- purpose: just a simple example module
module MMyScript; // <-- assign module name
print "hello, world."; // <-- initialization code, will be run before main() function
- TkScript Reference Guide » Modules » Common module include directory
Project file entries whose filename starts with
are searched in the
The included files will be "statically linked" in a packaged
This mechanism was mainly used before the "script library" feature was added to TkScript.
It may still be useful for mini-libraries.