Syntax colors parts of words

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
Lee
Posts: 10
Joined: Mon Sep 08, 2003 4:02 pm

Syntax colors parts of words

Post by Lee »

I am using syntax highlighting with COBOL. It works very nicely except that it considers dashes ("-") to be delimiters and to separate terms. As a result, I'll get reserved words highlighted in the middle of variable names, ie: in this variable name, "POINTER" would be one color while the rest would be another: WORK-STRING-POINTER

How can I change the syntax file to keep this from happening?
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Try ..

Configure /preferences / etc etc ..
Drill down and choose your syntax file...
Theres a textfield on the dialog "Other characters in words" ... type a dash just next to whatever is there.

<Keith>Will keep both Textpad and Cobal happy</Keith> :lol:

Should work.

webM
bobcongmon
Posts: 1
Joined: Thu Sep 18, 2003 2:45 pm

Syntax highlighting in Cobol

Post by bobcongmon »

This works great, thanks...except I notice that it does not work if other parts of the word are purely NUMERIC.

For example, in paragraph name 2200-EXIT, the word EXIT (and only that word) is still highlighted. If the name is 2200A-EXIT, the complete name is not highlighted (which is what we want).
Post Reply