<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#330000">
<span id="IDstID"><font face="Calibri">Thanks Steve, it helped.<br>
<br>
</font>On Thu, 31 Mar 2011 09:32:53 -0400, Steve King wrote:</span>
<blockquote cite="mid:4D948285.9070905@arbor.net" type="cite">On
2011-03-30 18:52, Kaster Might wrote:
<br>
<blockquote type="cite">If some variable starts with "C", the
whole line which contains that variable and where it at the very
first place highlighted as comment. I suppose it comes from old
F77 style, where C denotes comment, but it's not necessary now.
Is there any way to fix it? My current way-around is to put
single space before that variable, but in this case overall code
doesn't look as nice as before.
<br>
</blockquote>
<br>
The 'Fortran - Modern' bundle inherits this behavior from 'Fortran
- Punchcard'. Modern makes an attempt to flag lines beginning
with 'C' as invalid, but only if the 'C' is followed by
whitespace. Punchcard treats any line beginning with 'C' as a
comment.
<br>
<br>
I think the easiest way to work around this is to edit the
Punchcard language definition to change the 'begin' expression for
'comment.line.c.fortran' from '^[Cc]' to '^[Cc]\s+', which
requires comments to start with 'C' followed by whitespace.. This
may not strictly adhere to the language spec, but it probably
matches common practice. And if you're not using the older F77
style it won't matter anyway.
<br>
<br>
{ name = 'comment.line.c.fortran';
<br>
begin = '^[Cc]\s+';
<br>
end = '$\n?';
<br>
beginCaptures = { 0 = { name =
'punctuation.definition.comment.fortran'; }; };
<br>
patterns = ( { match = '\\\s*\n'; } );
<br>
},
<br>
<br>
(Wow, FORTRAN... That takes me back to 1984 and the start of
college. That was the first year the freshman FORTRAN class was
taught using an interactive terminal instead of on punch cards.
Of course, it was on VM/CMS which implemented a virtual card
punch/reader system, but at least we had the glorified virtual
card punch that was XEDIT.)
<br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Kaster Might</pre>
</body>
</html>