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:

Whitespace

The empty text between words. Note that for whitespace, only the background color will be used.

Comments

All styles of comments in Free Pascal.

Reserved words

All reserved words of Free Pascal. (See also Reference Guide).

Strings

Constant string expressions.

Numbers

Numbers in decimal notation.

Hex numbers

Numbers in hexadecimal notation.

Assembler

Any assembler blocks.

Symbols

Recognised symbols (variables, types).

Directives

Compiler directives.

Tabs

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.