COMPILE
Compiles program files (.PRG, .WFM), creating object code files (.PRO, .WFO).
Syntax
COMPILE <filename 1> | <filename skeleton>
[AUTO]
[LOG <filename 2>]
<filename 1> | <filename skeleton>
The file(s) to compile. If you specify a file without including its path, dBASE Plus looks for the file in the current directory only. If you specify a file without including its extension, dBASE Plus assumes .PRG.
AUTO
The optional AUTO clause causes the compiler to detect automatically which files are called by your program, and to recompile those files.
LOG <filename 2>
Logs the files that were compiled, and any compiler errors or warning messages to <filename 2>. The default extension for the log file is .TXT.
Description
Use COMPILE to explicitly compile or recompile program files without loading or executing them. dBASE Plus automatically compiles program source files into object (bytecode) files when they are loaded (with SET PROCEDURE or SET LIBRARY) or executed (with DO or the call operator). The compiled object files are created in the same directory as the source code files.
The file is compiled with coverage information if SET COVERAGE is ON or the file contains the
#pragma coverage(on)
directive.
When you compile a program, dBASE Plus detects any syntax errors in the source file and either logs the error in the LOG file, or displays an error message corresponding to the error in a dialog box that contains three buttons:
Cancel cancels compilation (equivalent to pressing Esc).
Ignore cancels compilation of the program containing the syntax error but continues compilation of the rest of the files that match <filename skeleton> if you specified a skeleton.
Fix lets you fix the error by opening the source code in an editing window, positioning the insertion point at the point where the error occurred.