Compiling and Uncompiling Zim Programs
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.
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.
The UNCOMPILE Command
This command only changes the compilation status of the program thus marking this program as not compile but does not touch the disk file that contains the compiled version of the program.