<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Editor text colour anomalies]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=219</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=219&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Editor text colour anomalies.]]></description>
		<lastBuildDate>Tue, 05 Aug 2014 16:05:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Editor text colour anomalies]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1475#p1475</link>
			<description><![CDATA[<p>John,</p><p>It&#039;s no problem, and it&#039;s an honest mistake.&nbsp; However, the colorization engine is far from perfect, so please do post any inconsistencies you see.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 05 Aug 2014 16:05:44 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1475#p1475</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editor text colour anomalies]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1474#p1474</link>
			<description><![CDATA[<p>CORRECTION.</p><p>I&#039;ve just realised my own mistake.</p><p>The &#039;Debug&#039; lines are not marked with a &#039;C&#039; in the first character position, so the editor won&#039;t know that they are comments.&nbsp; I do this on purpose when I come to the end of a session.&nbsp; When I resume, which might be an hour later or a month later or anything in between, I use the compiler to find my messages I&#039;ve left for myself, which it flags up as errors, obviously.&nbsp; I then insert a &#039;C&#039; in front of each error line and, reminded of where I had left off and what I was trying to solve, I am able to continue debugging.</p><p>Sorry about the incorrect post but people might find this interesting nonetheless.<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Mon, 04 Aug 2014 22:07:01 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1474#p1474</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editor text colour anomalies]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1473#p1473</link>
			<description><![CDATA[<p>This is not an important point but you might be interested to see it, Jeff.<br />Please see this screenshot.</p><p><span class="postimg"><img src="http://i.imgur.com/ANl4q6I.jpg" alt="http://i.imgur.com/ANl4q6I.jpg" /></span></p><p>Note how, (i) in the first &#039;Debug&#039; line that can be seen in the screenshot, the word &#039;program&#039; is incorrectly coloured red, and, (ii) in the second &#039;Debug&#039; line, beginning with the word, &quot;only&quot;, the text colour changes wrongly into blue, signifying incorrectly that the editor is misinterpreting it as Fortran code, not a comment string.<br />--- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Mon, 04 Aug 2014 21:55:56 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1473#p1473</guid>
		</item>
		<item>
			<title><![CDATA[Re: Editor text colour anomalies]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=856#p856</link>
			<description><![CDATA[<p>John,</p><p>I&#039;ve found the culprit.&nbsp; Basically, the lexing engine for colorizing Fortran always assumes strings that don&#039;t close before the end of a line are an error, and this fact is certainly true in Fortran 90 and higher.&nbsp; However, in fixed-format Fortran, your example is perfectly valid.&nbsp; I just added some checks to see if we&#039;ve reached the end of a line and we&#039;re in fixed-format mode. If so, the lexer is told that we&#039;re still in string mode until it doesn&#039;t encounter a continuation character.&nbsp; Here&#039;s how it renders now:</p><p><span class="postimg"><img src="http://i.imgur.com/khVGoEL.png" alt="http://i.imgur.com/khVGoEL.png" /></span></p><br /><p>Good bug you&#039;ve found there!</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 01 Jul 2013 21:48:25 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=856#p856</guid>
		</item>
		<item>
			<title><![CDATA[Editor text colour anomalies]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=850#p850</link>
			<description><![CDATA[<p>I often notice the editor making mistakes in the colours used in the text.<br />I&#039;ve sent an email to Jeff with attachments illustrating this.</p><p>I adopt a convention of putting debug statements between two identifying lines like this:</p><p>C--debug--------------------------------------------------------------\-<br />&nbsp; &nbsp; &nbsp;DEBUG CODE<br />&nbsp; &nbsp; &nbsp;GOES IN HERE<br />C--debug--------------------------------------------------------------/-</p><p>This is so that I can easily find and remove the debug code after I no longer need it.<br />The editing colour anomalies seem to happen when I do this.</p><p>Here is one of the examples I&#039;ve emailed to Jeff, which I am reproducing here using &#039;BBCode&#039;, :</p><p><strong><span style="color:green">C--debug--------------------------------------------------------------\-</span><br />&nbsp; &nbsp; &nbsp; <span style="color:red">write</span>(F%O%LU,&#039;(2(&#039;&#039;\par &#039;&#039;),<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;&#039;VECTR(&#039;&#039;,I2,&#039;&#039;,&#039;&#039;,<span style="color:green">I2,&#039;&#039;) =&#039;&#039;,F10.2,&#039;&#039;\par &#039;&#039;,</span><br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;&#039;RSTIF(&#039;&#039;,I2,&#039;&#039;) =&#039;&#039;,F10.0,&#039;&#039;\par &#039;&#039;,<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;&#039;VECTR(&#039;&#039;,I2,&#039;&#039;,1) =&#039;&#039;,F10.2)&#039;)<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IL<span style="color:green">CAS,IDOFG(J), VECTR(ILCAS,IDOFG(J)),</span><br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JR+1, RSTIF(JR+1),<br />&nbsp; &nbsp; &nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ILCAS, VECTR(ILCAS,1)<br /><span style="color:green">C--debug--------------------------------------------------------------/-</span></strong></p><p>It is not caused by my use of the backslash character in text strings, by the way, because it also happens in code that does not contain a backslash.&nbsp; (In case anyone wants to know, I use backslash in text strings when generating output to .RTF files.&nbsp; In the above example, &quot;\par &quot; produces a CR/LF in an .RTF file).<br />---- <br />John</p>]]></description>
			<author><![CDATA[null@example.com (JohnWasilewski)]]></author>
			<pubDate>Sun, 30 Jun 2013 05:21:29 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=850#p850</guid>
		</item>
	</channel>
</rss>
