Each module's text resides in a document file that describes all aspects of the module (an application's main document file is named AppMod.src). Each document file contains one or more modules' text. The format of this text is quite specific, with the exception of user comments which are allowed nearly anywhere in the text.
The following rules govern the structure of a module:
• If a document file contains two or more modules, then each module after the first must be delineated by angle brackets. An opening angle bracket "<" must precede the module and a closing angle bracket ">" must follow the end of the module.
• If a file contains only one module, the angle brackets are not used.
• The module itself begins with a name.
• If a module is to display a graphics window, an optional set of four variables may be specified in parentheses following the name. See Module Reference Boxes for more information.
• The module's variables are listed next, enclosed in a set of parentheses.
• A set of square brackets enclose all the variables and sub-modules that will be called by the current module. Each sub-module takes the form: ModuleName followed by the keyword "Module", followed by the name of the file where that module will be found if it is not in the current file.
• The remainder of the module is occupied by the named states that provide its functionality.
When a document file is compiled, all modules defined in the file are compiled. Note that sub-modules declared in the file, but stored in separate files will not be compiled.
Compilation produces a set of files known as .RUN files from which the program may be executed. .RUN files are created in the same directory as the .SRC files that produced them - one for each module.