Understanding the code beautifier tool

This is an introduction to the source code beautifier tool.

The code beautifier tool built in the fglcomp compiler can be used to reformat .4gl source modules and get a readable source code, using consistent indentation and source layout rules across modules.

Note: The code beautifier supports uppercase or lowercase keyword coding conventions. See the --fo-lowercase-keywords option usage for more details.
The beautifier tool:
  • Indents source lines for nested code blocks,
  • Converts language keywords to uppercase or lowercase,
  • Adds or removes space characters between tokens,
  • Breaks long lines,

By default, the new reformatted source code is written to the standard output stream (stdout). Use the --fo-inplace option to replace directly the original source file.

Important: The input source file must compile. Indenting a source file with errors will produce an unpredictable result.