Loading...
Searching...
No Matches
Imports

Sometimes it may be useful to load script modules dynamically without having to recompile the main script, but still let the modules interact with each other. In that case the script may import functions from another module. This declaration is written using the import keyword, followed by the function signature, and then specifying which module to import from.

This allows the script to be compiled using these imported functions, without them actually being available at compile time. The application can then bind the functions at a later time, and even unbind them again.

If a script is calling an imported function that has not yet been bound the script will be aborted with a script exception.

      import void MyFunction(int a, int b) from "Another module";