Include


 

Include>scriptfile

 

Includes code from an external script file.  The code is executed and made available to the calling script.  Therefore variables and subroutines in the external script file are made available to the calling script.

 

With Include the code in the Include file literally becomes part of the main script at run time.  Including a script is rather like copying and pasting the code from it into the main script at runtime.  To understand this better, step through a script that has an Include line in the debugger - you will see the code inserted into the script when the Include line is executed.

 

This differs markedly from the Macro command which only runs the external script file as a separate entity, rather like running any other program.

 

See also: IncludeFromVar, Macro