Syntax Highlighting for Comments, in need of Help

General questions about using TextPad

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

Post Reply
berndt_dm
Posts: 3
Joined: Wed Jan 12, 2005 1:43 pm

Syntax Highlighting for Comments, in need of Help

Post by berndt_dm »

My problem is with the following features in the .syn files.

SingleComment = C
SingleCommentCol = 1

It works fine for the following cases

C This is a comment
C****** This is a comment *******

However, does not work in the following case

C000010 This line is a comment

Unfortunately, the for a comment to be started it must have a line number. The first two cases would be used such as below and would be more a visual aid to the programmer rather than actual interpretted code.

C000015
C******************
C* This is a comment *
C******************$

I could use the above format for future development but I'm working with code already in place and it would be an major undertaking to change all the code to the above format. Most of the code is in the following format.

C000020 This is a comment$

So it appears to work if the comment indicator is followed by a blank space or special characters, such as '*' but not when followed by numbers or text for that matter.

Any suggestions on a workaround or is this a bug of some sort?
User avatar
SteveH
Posts: 327
Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:

Re: Syntax Highlighting for Comments, in need of Help

Post by SteveH »

Hmmm, looks very like ATLAS to me.

I can't really add much to this other than I've tried this and had exactly the same problem. My syntax definition file copes with multi-line comments and single line ones but I also have a problem when a line number follows the single comment string.

From the documentation on the syntax definition files, I would have expected this to work unless I am missing something.

Cheers,

Steve
LetzRoll
Posts: 2
Joined: Fri Jan 14, 2005 8:54 am

Post by LetzRoll »

so set the flag to C0 (that's a zero) instead of C.
User avatar
SteveH
Posts: 327
Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:

Post by SteveH »

It won't always be a zero though.

Cheers,

Steve
LetzRoll
Posts: 2
Joined: Fri Jan 14, 2005 8:54 am

Post by LetzRoll »

first: try assigning the value 'leading' to SingleCommentCol.

second: rtfm.
User avatar
SteveH
Posts: 327
Joined: Thu Apr 03, 2003 11:37 am
Location: Edinburgh, Scotland
Contact:

Post by SteveH »

Did that work for you because it didn't here?

Steve
berndt_dm
Posts: 3
Joined: Wed Jan 12, 2005 1:43 pm

Post by berndt_dm »

Hmmm, looks very like ATLAS to me
You are correct Steve it is ATLAS. Good eye.
so set the flag to C0 (that's a zero) instead of C.
Even if all the line numbers started with C0 this wouldn't work because you run into the same problem if something trails the C0, i.e.

C000010 comment $

This wouldn't work because 00010 trails C0 and we run into the same problem again.

first: try assigning the value 'leading' to SingleCommentCol.

second: rtfm.
I tried the first suggestion with no luck. I'm getting the same result.

-d
usbobbie
Posts: 11
Joined: Wed Jan 05, 2005 4:11 pm

Post by usbobbie »

I'm having the same problem with Keywords. If a Keyword is followed by any character other than a space it does not get color-coded. I mention this in my post at http://www.textpad.info/forum/viewtopic.php?t=6101.

I've looked everywhere but cannot find an answer. Since nobody has replied to my post, I'm assuming that it cannot be done??? :?
berndt_dm
Posts: 3
Joined: Wed Jan 12, 2005 1:43 pm

Post by berndt_dm »

bump
randomwanderer
Posts: 10
Joined: Thu Feb 10, 2005 6:57 pm

Using ATLAS here

Post by randomwanderer »

I have similar concern, want, problem... Been programming in ATLAS for years. Now on project with CASS test station using essentailly ATLAS 416.
Anyone doing something similar?
Forrest in Orlando, FL
Post Reply