Lahey Fortran

Parenthesis Matching

Parenthesis matching is a feature that locates a matching parenthesis and highlights the parenthesis pair. This feature can be quite useful when examining a complex statement. The following diagram shows a single multiline code statement with the matching braces highlighted with a light gray box:

To jump to the matching parenthesis, press Ctrl-].

In order for parenthesis matching to work properly, the code must be free of errors.

Parenthesis matching is activated whenever the cursor is positioned immediately before an opening parenthesis, or immediately after a closing parenthesis. Parenthesis matching will not work on parentheses that are located within a character string.

The highlight color for parenthesis matching can be changed in Tools | Options. In the Options dialog, expand the "Environment" node and select "Fonts and Colors". In the "Display Items" list, select "Brace Matching (Rectangle)". The background highlight color can be changed using the "Item Background" control.

Note that changing the highlight color will affect all brace matching for all languages, not just Fortran.