Another Color Issue - How to?

General questions about using TextPad

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

Post Reply
Dan Wallace

Another Color Issue - How to?

Post by Dan Wallace »

I am using TP as a COBOL with embedded SQL editor.
It works beautifully and the colored highlights are
great. I have recently come across a need for additional
colors and I can't figure out how to implement them.

I currently have comments starting with a "*" in column
7 colored green. We are now doing a structure where
a comment starting with "*_" in columns 7 and 8 is
a comment for the precompiler but is ignored and used as
code in the compiler. I would like to have these lines
colored differently. Is this possible. I have tried using
a second SingleComment and also a keyword, but no results.

The other need, though minor, would be to have any text
between column 73 and 80 a different color.
(It's a COBOL thing).

I append part of my syntax file below:

C=1

[Syntax]
Namespace1 = 5
IgnoreCase = Yes
InitKeyWordChars = A-Za-z
KeyWordChars = A-Za-z0-9-
BracketChars=()
OperatorChars=*/+-><
PreprocStart =
SyntaxStart =
SyntaxEnd =
CommentStart =
CommentEnd =
CommentStartAlt =
CommentEndAlt =
SingleComment = *
SingleCommentCol = 7
SingleCommentalt = --
StringStart = "
StringEnd = "
StringAlt = '
StringEsc = '
CharStart = "
CharEnd = "
CharEsc =

Any help would be apprciated.

Thanks,

Dan Wallace
Roy Beatty

Re: Another Color Issue - How to?

Post by Roy Beatty »

I've never manipulated syntax files, but the regex to find columns 73-80 is <br>

^\(.\{72\}\)\(.\{8\}\)
where replacement expression \1 = cols 1-72 and \2 = cols 73-80.

Hope this helps,

Roy
chuck_leviton
Posts: 1
Joined: Wed Aug 06, 2003 9:12 pm

COBOL Color Coding

Post by chuck_leviton »

Hi Dan,
Could you tell me how to set up the document class etc to use TextPad with COBOL?
At the risk of sounding parasitic, are there some reg files that you could send me that I can run?

Thanks
Post Reply