Fortran properties file

53 views
Skip to first unread message

mikeAz

unread,
Sep 23, 2009, 7:26:00 PM9/23/09
to scite-interest
Hi

I updated to the 2.01 version yesterday so that I could use the
Fortran syntax highlighting. I write in Fortran 95. Incidentally, I
changed an option in the properties file to let *.f be recognized as
f95 as well.

My problem is as follows: I tried to edit the fortran.properties file
so that comments that begin with a "c" or any variant thereof (cc, c**
etc) are highlighted as comments. I can't get this to work. Only the
"!" works for comments. My code is 6000 lines long, so I really don't
want to do a massive search and replace.

I think the problem is in this line (fortran.properties).
comment.block.fortran=!~

Any suggestions?

Thanks Mike

Neil Hodgson

unread,
Sep 24, 2009, 5:24:03 AM9/24/09
to scite-i...@googlegroups.com
mikeAz:

> My problem is as follows: I tried to edit the fortran.properties file
> so that comments that begin with a "c" or any variant thereof (cc, c**
> etc) are highlighted as comments. I can't get this to work. Only the
> "!" works for comments. My code is 6000 lines long, so I really don't
> want to do a massive search and replace.
>
> I think the problem is in this line (fortran.properties).
> comment.block.fortran=!~

That changes the behaviour of the SciTE 'Block Comment or
Uncomment' command. It has no effect on highlighting which is defined
in the lexer scintilla/src/LexFortran.cxx. It appears that 'c' or 'C'
define comments only in fixed format which is when the 'f77' lexer is
used rather than 'fortran'. From a brief search it appears that
comments starting with 'c' are not valid in free format. If this is
permitted by compilers then it could be added as an option if someone
wants to contribute the code.

Neil

Reply all
Reply to author
Forward
0 new messages