The Clarion Advisor On Editor Colors

by Bruce Wells

Published 1999-05-03    Printer-friendly version

Have you ever explored the colors setup in the Clarion 5 Editor configuration? If not, then you are missing one of the most powerful features of the editor.

Imagine you're typing code, putting together a MESSAGE() statement, and you completely miss the fact that you forgot to insert one of the necessary single quotes for the message text string. You save your work, generate and start the compile only to have the compiler burp on the unterminated string. Well it's an easy fix and doesn't take too long, but how many times are you going to do this?

With your colors properly configured, the text will change colors as you type the characters, indicating proper syntax.

I use a black background in my editor because this provides the most contrast with a wider variety of colors. Bright cyan or yellow on white is nearly illegible, but on black these colors are very noticeable.

If you're interested in trying this feature and can live with my color selections, consider the following recommendations. Figure 1 shows the Colors tab on the Editor Options window (choose Setup|Editor Options). If you've made any changes to your editor colors beforehand be sure to save a copy of c5edt.ini. If you haven't made any changes you can always click on Restore Defaults if your choices don't work out.

Figure 1. The Editor Options Window

editorcolorsfig1.gif (8600 bytes)

Notice that the color palette display consists of four rows and eight columns. For the purpose of this discussion, I will refer to the colors by their coordinates. For example, black will be 1,1 (row 1, column 1). Below are all the components affected by color and their correspondingly assigned colors.

Normal Text 2,2
Normal Background 1,1
Block Text 4,2
Block Background 2,3
Line HighLight Text 2,2
Line HighLight Background 1,1
Error Line Text 4,2
Error Line Background 2,4
Label 3,6
Comment 2,5
String 2,7
User Identifier 4,4
Integer Constant 3,4
Real Constant 1,7
Picture String 2,6
Disabled Text 4,1
Disabled Text Background 1,1
Clarion Keywords 1,8
Compiler Directives 1,7
Built-In Procedures/Functions 3,3
Structures Data Types 2,6
Attributes 3,5
Standard Equates 4,7

This information is stored in the [color_map] section of c5edt.ini, so if you wish you can instead cut and paste Listing 1, replacing your [color_map] section

Listing 1. Color map settings in c5edt.ini.
[color_map]
0=192,192,192
1=0,0,0
2=255,255,255
3=192,192,255
4=192,192,192
5=0,0,0
6=255,255,255
7=255,0,0
8=255,0,255
9=255,255,0
10=0,192,0
11=255,223,223
12=255,192,32
13=0,128,0
14=192,0,192
15=110,110,110
16=0,0,0
17=0,128,128
18=-1
19=-1
20=0,128,0
21=192,192,255
22=192,0,192
23=255,223,192
24=223,255,223
25=0,128,0
26=0,0,192
27=0,0,192
28=0,0,192
29=0,0,192
30=0,0,192
31=0,0,192

Figure 2 shows some ABC code displayed with these color assignments.

Figure 2. ABERROR.CLW with modified editor colors.

editorcolorsfig2.gif (15158 bytes)

Of course you should feel free to change these color designations. After all, it's your system! But don't be afraid to spend some time thinking through your color designations. They can be a great asset to you for the time you spend in the editor.

Enjoy!!

Printer-friendly version

Reader Comments

To add a comment to this article you must log in.