Set compiler options
- Last Updated: January 22, 2026
- 3 minute read
- OpenEdge
- Version 12.8
- Documentation
You can change the behavior of the compiler, and enforce certain rules, by specifying compiler options. Using compiler options allows you to identify and fix issues in your code, making your code unambiguous and more robust. Rules you can specify include requiring full table and field names, fully qualified buffer references, full keywords, and return values for user-defined functions, non-VOID methods, and property getters. You can optionally specify a severity level (warning or error) for each type of option.
| Option name | Description |
|---|---|
| require-full-names | All table and field names must appear as they are in the schema. The compiler's ability to implicitly resolve abbreviated table names is disabled. |
| require-field-qualifiers | All buffer references (including database tables, temp-tables, and buffers) must be fully qualified. The compiler's ability to implicitly resolve the buffer to which a field reference refers is disabled. |
| require-full-keywords | All ABL language keywords must be fully spelled out. |
| require-return-values | In user-defined functions, non-VOID methods, and property
getters, all logical code paths must have RETURN
value statements. For more information, see
Require-return-values compiler option. |
Setting the severity level for a compiler option
There are two
possible severity levels which can be set by the user: warning or error. The warning level produces a message for each violation,
but allows the compilation to complete successfully, provided that the only
violations are related to the option. The error
severity level produces a message for each violation and prevents the compilation
from completing successfully. If you specify an option without a severity level, the
default is warning. If you don't specify a compiler
option, then no violation checking is performed for that option.
To set a severity level, append a colon (:) to the option name, followed by the severity level:
| option-name:severity-level |
- option-name
- Valid values are
require-full-names,require-field-qualifiers,require-full-keywords, orrequire-return-values. - severity-level
- Valid values are
warningorerror.
require-return-values compiler option:
|
|
|
Ways to set compiler options
COMPILE
statement. The third way uses the COMPILER system
handle, and the fourth way uses the -compileroptionsfile startup parameter.- The
OPTIONSphrase on theCOMPILEstatement.When compiling a file in ABL, use theOPTIONSphrase to specify the desired compiler options. Separate each option with a comma, and enclose the list in quotes. For example:
For more information on theCOMPILE basic.p OPTIONS "require-full-names:error,require-field-qualifiers:error".OPTIONSphrase, see the COMPILE statement. - The
OPTIONS-FILEphrase on theCOMPILEstatement.When compiling a file in ABL, use theOPTIONS-FILEfilename phrase on theCOMPILEstatement to specify the name of a file that contains the options. filename should be an absolute path or a path relative to PROPATH. For example:COMPILE basic.p OPTIONS-FILE myCompilerOptions.The options file is a plain text file. Anything between a hash tag (#) and the end of line in the file is treated as a comment. The compiler options must be separated by commas even if on different lines. For example:For more information on the# myCompilerOptions require-full-keywords, # no severity specified; warning is the default require-full-names:error, require-field-qualifiers:error, require-return-values:warningOPTIONS-FILEphrase, see the COMPILE statement. - The
OPTIONSattribute on the COMPILER system handle.Before compiling a file in ABL, set the OPTIONS attribute on the COMPILER system handle. For example:COMPILER:OPTIONS = "require-return-values:warning". COMPILE basic.p. COMPILER:OPTIONS = "". // reset to no compiler options - The
-compileroptionsfilestartup parameter.When starting up the ABL client, use the
-compileroptionsfilestartup parameter, to specify a file containing the options. This sets theOPTIONSattribute to the values in the file.
The file is the same format as described in the second method for the-compileroptionsfile filenameOPTIONS-FILEphrase of theCOMPILEstatement. For more information on this startup parameter, see Compiler Options File (-compileroptionsfile).