<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Editor text colour anomalies]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=219&amp;type=atom" />
	<updated>2014-08-05T16:05:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=219</id>
		<entry>
			<title type="html"><![CDATA[Re: Editor text colour anomalies]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1475#p1475" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-08-05T16:05:44Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1475#p1475</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Editor text colour anomalies]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1474#p1474" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-08-04T22:07:01Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1474#p1474</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Editor text colour anomalies]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1473#p1473" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-08-04T21:55:56Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1473#p1473</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Editor text colour anomalies]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=856#p856" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2013-07-01T21:48:25Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=856#p856</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Editor text colour anomalies]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=850#p850" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2013-06-30T05:21:29Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=850#p850</id>
		</entry>
</feed>
