6.5.5 Syntax highlighting

The IDE is capable of syntax highlighting, i.e. the color of certain Pascal elements can be set. As text is entered in an editor window, the IDE will try to recognize the elements, and set the color of the text accordingly.

The syntax highlighting can be customized in the colors preferences dialog, using the menu option ”Options—Environment—Colors”. In the colors dialog, the group ”Syntax” must be selected. The item list will then display the various syntactical elements that can be colored:

The empty text between words. Note that for whitespace, only the background color will be used.
All styles of comments in Free Pascal.
Reserved words
All reserved words of Free Pascal. (See also Reference Guide).
Constant string expressions.
Numbers in decimal notation.
Hex numbers
Numbers in hexadecimal notation.
Any assembler blocks.
Recognised symbols (variables, types).
Compiler directives.
Tab characters in the source can be given a different color than other whitespace.

The editor uses some default settings, but experimentation is the best way to find a suitable color scheme. A good color scheme helps in detecting errors in sources, since errors will result in wrong syntax highlighting.