Units

Top  Previous  Next

DialogScript programs don't have to be written in a single source file. You can include other DialogScript .dsc files in your program using the #INCLUDE directive. Typically, this feature is used to include sections of code or routines that are executed using the GOSUB command, or which contain user-defined commands and user-defined functions. This feature allows you to create a library of routines which you can incorporate into many different programs, and to exchange such routines with other DialogScript programmers.

 

Included files may be ordinary plain text DialogScript .dsc files. This is generally the most convenient form for personal use.

 

Source files designed for inclusion in other programs can be made into DialogScript units (.dsu files) by selecting this option from the Project Manager. The code in DialogScript unit files is semi-compiled and encrypted to protect it from prying eyes and accidental modification. This format is useful if you want to distribute routines for inclusion in other programs without giving away the source code.