TScript Compiler Commands

The TScript compiler has a source interface as well as a method interface. This means that compiler command can be written into the source text via the use of hash ('#') symbol followed by the special keyword and any relevant parameters.

The "#include <filename.ts>" command will include the TScript source into the TScript engine. This will process the source file and allow any static methods to be called.

The "#include <filename.h>" command will include the C++ header file into the TScript engine. This will only include the function, class and type definitions from the native C++ file into the script.

The "#version <version string>" command will allow the TScript engine to embed the appropriate version number into any precompiled TScript source libraries. This will allow any installer program to identify the latest version of a TScript library. This compiler command has also proven useful to indicate the latest version of the source code.

The "#tscipt <version string>" command will allow the TScript engine to only compile and run TScript source code that is a compatable version. For example is the code is written relyant one version TScript V1.1 and the actual compiled version is V1.2, then it will run without error, but if the compiled version is V1.0 then it will cause an error during compilation.