fglcomp
The fglcomp tool compiles .4gl source files into .42m p-code modules, and does various other tasks.
Syntax 1: Compiling .4gl sources
fglcomp [comp-options] [prepro-options] file-list
- comp-options are described in compilation options.
- prepro-options are described in preprocessor options.
- In this form, fglcomp can handle several .4gl sources files as arguments, see file-list.
{ { module[.4gl]
| pattern
} [...]
| @argfile
}
- module.4gl is a source file to compile. The .4gl extension is optional.
- pattern is a
MATCHES
-style pattern to find files, like'[a-z]*.4gl'
. - argfile defines a file that contains a list of .4gl sources to be compiled. Each line must specify a filename or a pattern.
Syntax 2: Building documentation
fglcomp --build-doc [doc-options] [prepro-options] module[.4gl]
- doc-options are described in documentation options.
- prepro-options are described in preprocessor options.
- module.4gl is a source file to compile. The .4gl extension is optional.
Syntax 3: Extracting localized strings
fglcomp -m [prepro-options] module[.4gl]
- module.4gl is a source file to compile. The .4gl extension is optional.
- prepro-options are described in preprocessor options.
- In this form, fglcomp extracts localized strings from the source.
Syntax 4: Source code formatting
fglcomp --format [format-options] module[.4gl]
- format-options can be any of the formatting options.
- module.4gl is a source file to compile. The .4gl extension is optional.
Syntax 5: Add imported module prefixes
fglcomp --qualify-imports [prepro-options] module[.4gl]
- prepro-options are described in preprocessor options.
- module.4gl is a source file to compile. The .4gl extension is optional.
Syntax 6: Show dependencies
fglcomp --dependencies [prepro-options] file-list
- prepro-options are described in preprocessor options.
- In this form, fglcomp can handle several .4gl sources files as arguments, see file-list.
Syntax 7: Information options
fglcomp info-option
- info-option can be any of the informational options.
Options
Option | Description |
---|---|
-M |
Write error messages to standard output instead of creating a .err error file. |
--make |
Do not recompile .42m modules up-to-date with provided .4gl source. See Compiling in make mode. |
--simulate |
Print the list of .4gl sources that would
be compiled (can be used with or without --make ). See Compiling in make mode. |
-W warning-argument |
Produce warning messages.
The warning argument can be used as follows:
The -W option also supports the negative form of arguments by using the
no- prefix as in: no-return , no-unused ,
no-stdsql . You might need to use these negative forms in order to disable some
warning when using the -W all option:
Switches will be enabled/disabled in the order of appearance in the command line. |
--timestamp |
Add compilation timestamp to build information in 42m header. See 42m module information. |
--omit-source-name |
Omit the source file name in the build information of the 42m header. See 42m module information. |
--tag=string |
Write a custom string in the build information of the 42m header. See 42m module information. |
--build-rdd |
While compiling, generate the
module.rdd Report Data Definition file (of
REPORT routines). |
--verbose |
Print detailed compilation information. |
--implicit=type |
Specify whether or not to compile imported modules, if the
.42m does not exist, or if the .4gl source is more recent
as the .42m. Here type can be one of:
|
-r or --resolve-calls |
Throw an error on references to undeclared functions.
Each external function must be made known to the compiler by |
--java-option=option |
Passes Java runtime options when initializing the JNI interface. See Java Interface for more details. |
-S |
With this option, fglcomp extracts all Static SQL commands from the source while compiling the source code. |
Option | Description |
---|---|
--doc-private |
When using the --build-doc option, include
PRIVATE symbols to the documentation. |
Option | Description |
---|---|
--fo-align-consecutive-assignments={0|1} |
Aligns equal signs of consecutive variable assignments. Default is 0 (no alignment) |
--fo-align-consecutive-types={0|1} |
Aligns type specification of consecutive variable definitions. Default is 0 (no alignment) |
--fo-align-trailing-comments={0|1} |
Aligns consecutive comments. Default is 0 (no alignment) |
--fo-inplace
|
Write formatted output back to the provided file, instead of stdout. Creates a copy of the original file in filename.4gl~ |
--fo-fallback-style=filename
|
Specify the configuration filename to be used if no .fgl-format file is found. |
--fo-column-limit=integer |
Define the source line width limit. Default is 80. |
--fo-indent-width=integer |
Number of columns to use for indentation. Default is 4. |
--fo-continuation-indent-width=integer |
Indent width for line continuations. Default is 4. |
--fo-label-indent={0|1}
|
When 1, indent instruction clauses such as WHEN
in a CASE instruction. Default is 1 (enabled). |
--fo-pack={0|1}
|
When 1, try to put as many items on the same line as possible. When 0, use one line for each item. Default is 0 (do not pack). |
--fo-lowercase-keywords={0|1}
|
When 1, produce lowercase keywords. When 0, produce uppercase keywords. Default is 0 (uppercase). |
--fo-use-tab={0|1}
|
When 1, instead of using space characters all over for column
indentation (the default), use tabs to fill whitespace that spans at least from one tab stop to the
next one, based on --fo-tab-width and --fo_indent-width . |
--fo-tab-width=integer
|
Defines the number of columns used for tab stop, when
--fo-use-tab is specified. The default is 8 columns. |
--fo-lines=start-line:end-line
|
Formats only the range of lines specified. This option can be used multiple times to specify several pieces of code to be reformatted. |
Option | Description |
---|---|
-E |
Preprocess only. See Source preprocessor for more details. |
-p option |
Preprocessing control, where option can be one of:
|
-I path |
Provides a single path to search for include files. See Source preprocessor for more details. |
-D
ident[=value] |
Defines the macro 'ident' with an optional value (default is 1). See Source preprocessor for more details. |
-U ident |
Undefines the macro 'ident'. See Source preprocessor for more details. |
Option | Description |
---|---|
-V or --version |
Displays version information. |
-h or --help |
Displays options for the tool. |
-i [ mbcs ] |
Displays information about the current locale / character set settings. See Application locale. |
Usage
fglcomp customers.4gl
If a compilation error occurs, the compiler generates an error file with an
.err extension. The error file contains the original source code with
error messages. Use the option -M
to display the error messages to standard
error instead of producing the .err file.