Options Tab Page
Editing the compiler Options tab page does not change the values in the registry, which are read from the BuildOptions key value of the DFComp key.
Create List File Check Box
Errors reported at run time indicate the line number of the compiled program, which can differ significantly from the line number in the source code. A list file is an ASCII file created by the compiler that maps the source-code line number to the line number in the compiled program, helping you interpret and correct the causes of runtime errors.
The list file can also show expanded macros, constant replacements, include files, and compile errors. Therefore, a list file is useful for dealing with compile-time errors as well.
The root names are that of the source-code file with the extension .PRN (if it is a DataFlex program) or .PRP (if it is a DataFlex precompiled module).
Verbosity Level Spin Form
The higher you set the number in this box, the greater the detail that will be reported in the list file.
There are several ways to tell the compiler to create a list file and to specify the level of verbosity:
- Check the Create List File checkbox on the Options tab page. You will then be able to specify the verbosity level with a spin form.
- Include
forv#in theBuildOptionskey value.
Precompile Check Box
You may precompile either a separate package or the uppermost portion (the "header") of your source code to save time in subsequent recompilations during development. The header is the contiguous part of your source-code file that you do not change from one compilation to the next. The greater the portion of your source code that you precompile, the greater the time savings you can realize with each recompilation of a program whose header you have precompiled.
If you change any code in the precompiled section, you will have to either compile the whole program (which requires moving, renaming, or deleting the old precompiled-header files) or precompile the new header section again before recompiling your program. If you fail to do this, the changes you make to the header section will not take effect on recompilation.
You can designate the portion of your code to precompile by beginning it with the #HEADER compiler directive and ending it with #ENDHEADER. The #HEADER directive must be the first (non-comment) line in your source code.
Precompilation is especially useful with package and other include files. If the first (non-comment) line of your source code is a use command, precompilation will create precompiled modules of the package named in that command. This usage does not require #HEADER and #ENDHEADER, which can be used to precompile multiple package files.
The root name of each precompiled-header file is that of the source-code file, plus the extensions of .FLD, .PBG, .PKD, and .PRP. A .FLD, .PBG, .PKD, and .PRP file are created every time a header is compiled. Current versions of these files must be present in a directory listed in your MakePath when recompiling their host program. If they are not, the recompilation will not use the precompiled header.
There are several ways to tell the compiler to precompile:
- Check the Precompile box in the Options tab page.
- On the command line, pass
por/p(Compiler Options). - Include
pinin the value of theBuildOptionskey value.
See the Precompiling section for more details about precompiling.
Run after Compile Check Box
The compiler can be told to execute the new DataFlex program automatically after a successful compilation. It will not execute the program automatically if any error occurred during compilation.
There are several ways to tell the compiler to run the compiled program automatically after compilation:
- Check the Run After Compile box in the Options tab page.
- On the command line, pass
ror/r(Compiler Options). - Include
rinin theBuildOptionskey value.
Note: This option is defeated if any error occurred during compilation.
Write Error File Check Box
An error file is an ASCII file listing of the errors generated by the most recent compilation (unlike a list file, which lists both errors and source code). Its root name is that of the source-code file plus the extension .ERR.
There are several ways to tell the compiler to create an error file:
- Check the Write Error File box in the Options tab page.
- On the command line, pass
wor/w(Compiler Options). - Include
forwinin the value of theBuildOptionskey value.
The error file will have the same name as the source but with the extension .ERR.
Warnings On Check Box
Checking this checkbox enables Compiler Warnings.
Compiler Warnings will now appear in the compiler output list below, but only if the program being compiled has Compiler warnings enabled in its code. See the Compiler Warnings page for details.
Error Notification Level Radio
The compiler will report errors at one of three levels. Following the name of each choice below is the option value in parentheses to use when launching compilation from the command line.
- Quiet (E0): No prompt is ever given. You can only observe if an error has occurred by looking at the Error (.ERR) file, List (.PRN/.PRP) file, or progress display. This level is best if you are compiling in a batch process.
- At End (E1=default): At the end of compilation, a prompt is given signifying "done" if successful or the number of errors if not.
- On Each (E2): If an error occurs, a prompt is given allowing the user three options.
There are several ways to set the compiler error-notification level:
- Check the desired Error Notification Level radio box in the Options tab page.
- On the command line, pass
e#or/e#(Compiler Options) where#represents the desired level. - Include
e#in theBuildOptionskey value.