UpEditing a Source File > UpCOBOL Editor Previous Next

Setting Highlight Colors

Keywords can be highlighted using colors and font styles (boldface type). Highlight colors can be set for the following items.

Item

Explanation

Single-line comment

Every line beginning with "*" or "/" in the indicator area is treated entirely as a comment line. A line with "D" or "d" at its beginning is treated entirely as a comment line even if it includes debug information.

In-line comment

On a line with "*>", the portion from the "*>" to the end of the line is treated as an in-line comment.
Note: This rule also applies to the Fixed format.

Reserved words

A list of reserved words is defined in each COBOL version. For the reserved words, refer to "COBOL Grammar Specification".
Uppercase and lowercase letters are not distinguished.

Figurative constants

The figurative constants include the following:
SPACE, SPACES, ZERO, ZEROS, ZEROES, HIGH-VALUE, HIGH-VALUES, LOW-VALUE, LOW-VALUES, QUOTE, QUOTES, ALL.
Uppercase and lowercase letters are not distinguished.

Special register

The special register constants include the following:
LINAGE-COUNTER, PROGRAM-STATUS, RETURN-CODE, SORT-STATUS, EDIT-MODE, EDIT-OPTION, EDIT-COLOR, EDIT-STATUS, EDIT-CURSOR, LINE-COUNTER, PAGE-COUNTER.
Uppercase and lowercase letters are not distinguished.

Character strings

Character strings are defined in the following formats:
" ", B" ", X" ", N" ", NC" ", NX" ".
Uppercase and lowercase letters are not distinguished.
Single quotation marks or double quotation marks, whichever is preferred, can be used.

+ Displaying the highlight color settings

The highlight color settings for the above items can be displayed as follows:

  1. Select [Window] > [Preferences] from the menu bar. The [Preferences] dialog box is displayed.
  2. Select [COBOL] > [Editor] in the left pane. The [Editor] page is displayed.

    image

  3. Click the [Color] tab. The [List of Items], [Foreground Colors], [Bold] checkbox, and [Preview] areas are displayed.
  4. When an item is selected, styles are displayed for the set [Color] and [Bold] checkbox. The current settings are displayed in [Preview]

image

By default, the reserved words are displayed in boldface type, and all other items are displayed in the normal font style.

+ Changing the highlight color settings

The color settings for the above items can be changed as follows:

  1. To change the display color of an item, select the item from the [List of items].
  2. Click [Color] button. The [Color Settings] dialog box is displayed.

    image

  3. Click the target color in the [Basic Color] pallet. Alternatively, click [Define Custom Color] to create the desired color.
  4. To apply the selected color and close the dialog box, click [OK]. The selected color is reflected in the [Preview] area. To close the dialog box without applying the selected color, click [Cancel].
  5. To display the text in boldface type, select [Bold] checkbox.

image

The settings remain in effect even after the next time the editor is opened.

Previous Next

All Rights Reserved, Copyright (C) FUJITSU LIMITED 2003-2005