The Compile Command

To compile an application program, issue a COMPILE command that names the application document containing the program.

The COMPILE command reads the program, compiles it, and stores the compiled version in a separate disk file. The source program is then marked as being compiled. Thereafter, the compiled version of the program is used when that program is called.

Error Handling

As the Compiler processes an application program, it reports any errors that it finds in the command statements. The syntactic and semantic checks performed during compilation are identical to those performed when the program is parsed (using the PARSE command) or when the source program is run interpretively.

Provided that no fatal errors are detected, the Compiler completes the compilation (success). If a fatal error is detected (e.g., no room on disk, unable to open a file), the compilation terminates.

If the compilation is successful, the compiled program is stored, and the source program is marked as "compiled". If non-fatal errors occur, the document can still be marked as "compiled". However, a compiled program that has raised non-fatal errors during compilation may not execute properly.

If errors are raised during compilation, use the UNCOMPILE command to mark the document as "not compiled", or use the SET RUNTIME command to switch off the use of compiled programs.