<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — SF 2.9 FILE OUTLINE HIGHLIGHT ERROR]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=306</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=306&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SF 2.9 FILE OUTLINE HIGHLIGHT ERROR.]]></description>
		<lastBuildDate>Thu, 16 Jan 2014 20:54:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SF 2.9 FILE OUTLINE HIGHLIGHT ERROR]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1229#p1229</link>
			<description><![CDATA[<p>Jeff,</p><p>You are correct that explicitly naming the END of procedures (e.g., END SUBROUTINE NAME, END FUNCTION NAME) allows the SF File Outline list to highlight the correct procedure.</p><p>Perhaps I should have been more specific in my explanation.&nbsp; SF occasionally &#039;moves the cursor&#039; to the wrong sub or function procedure when the procedure name in the outline list is &#039;double clicked&#039;.&nbsp; On rare occasions as described in previous emails, double clicking one procedure (ch_is_control) causes the cursor to &#039;jump&#039; and highlight the above procedure ( s_control_blank).</p><p>As you clearly stated, explicitly naming the end of procedures eliminates this rare occurrence (not even sure I would call it a bug).</p><p>Hope this helps,</p><p>Frank</p>]]></description>
			<author><![CDATA[null@example.com (drfrank)]]></author>
			<pubDate>Thu, 16 Jan 2014 20:54:24 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1229#p1229</guid>
		</item>
		<item>
			<title><![CDATA[Re: SF 2.9 FILE OUTLINE HIGHLIGHT ERROR]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1228#p1228</link>
			<description><![CDATA[<p>Frank,</p><p>As with all &quot;good&quot; bugs, I can&#039;t seem to reproduce this yet.&nbsp; Using the code you posted, I was able to get the right highlight in the File Outline panel regardless of comments&nbsp; or spacing or mode (fixed- or free-format).&nbsp; I&#039;ll try it on a few other systems to see if I can get the problem to occur.</p><p>One detail that certainly will help the outline highlighting is to explicitly end procedures.&nbsp; For example, your closing line for your function is:</p><div class="codebox"><pre><code> end !function ch_is_control</code></pre></div><p>However, it would be perfectly valid Fortran to label the <em>end</em> statement with the procedure type and name:</p><div class="codebox"><pre><code> end function ch_is_control</code></pre></div><p>When the internal parser in Simply Fortran sees the labeled <em>end</em> statement, it reliably detects the function&#039;s closing line.&nbsp; Otherwise, it may occasionally become confused while detecting a procedure&#039;s closing line.</p><p>The above is, of course, a Simply-Fortran-specific tip.&nbsp; Ideally, Simply Fortran would be somewhat better at detecting procedures&#039; closing statements.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Thu, 16 Jan 2014 12:49:30 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1228#p1228</guid>
		</item>
		<item>
			<title><![CDATA[Re: SF 2.9 FILE OUTLINE HIGHLIGHT ERROR]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1227#p1227</link>
			<description><![CDATA[<p>Jeff,</p><p>Something peculiar is occurring in this code.&nbsp; Any changes in the code corrects the error encountered when using the file outline highlight search.&nbsp; The code below however, reproducibly highlights the incorrect routine on my PC using SF 2.9.&nbsp; Oddly, removing comments or adding comments seems to correct the problem.</p><p>Frank</p><p>!*********************************************************************72<br />&nbsp; &nbsp; &nbsp; subroutine s_control_blank ( s )<br />!*********************************************************************72<br />!<br />&nbsp; &nbsp; &nbsp; implicit none</p><p>&nbsp; &nbsp; &nbsp; logical ch_is_control<br />&nbsp; &nbsp; &nbsp; integer i<br />&nbsp; &nbsp; &nbsp; character*(*) s<br />&nbsp; &nbsp; &nbsp; integer s_len_trim<br />&nbsp; &nbsp; &nbsp; integer s_length</p><p>&nbsp; &nbsp; &nbsp; s_length = s_len_trim ( s )</p><p>&nbsp; &nbsp; &nbsp; do i = 1, s_length<br />&nbsp; &nbsp; &nbsp; &nbsp; if ( ch_is_control ( s(i:i) ) ) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s(i:i) = &#039; &#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; end if<br />&nbsp; &nbsp; &nbsp; end do</p><p>&nbsp; &nbsp; &nbsp; return<br />&nbsp; &nbsp; &nbsp; end !subroutine s_control_blank</p><p>!*********************************************************************72<br />&nbsp; &nbsp; &nbsp; function ch_is_control ( c )<br />!*********************************************************************72<br />!<br />!&nbsp; Parameters:<br />!&nbsp; &nbsp; Input, character C, the character to be tested.<br />!<br />!&nbsp; &nbsp; Output, logical CH_IS_CONTROL, TRUE if C is a control character, and<br />!&nbsp; &nbsp; FALSE otherwise.<br />!<br />&nbsp; &nbsp; &nbsp; implicit none</p><p>&nbsp; &nbsp; &nbsp; character c<br />&nbsp; &nbsp; &nbsp; logical ch_is_control</p><p>&nbsp; &nbsp; &nbsp; if ( ichar ( c ) &lt;= 31 .or. ichar ( c ) &gt;= 127 ) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ch_is_control = .true.<br />&nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ch_is_control = .false.<br />&nbsp; &nbsp; &nbsp; end if</p><p>&nbsp; &nbsp; &nbsp; return<br />&nbsp; &nbsp; &nbsp; end !function ch_is_control</p>]]></description>
			<author><![CDATA[null@example.com (drfrank)]]></author>
			<pubDate>Thu, 16 Jan 2014 01:00:35 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1227#p1227</guid>
		</item>
		<item>
			<title><![CDATA[Re: SF 2.9 FILE OUTLINE HIGHLIGHT ERROR]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1226#p1226</link>
			<description><![CDATA[<p>Frank,</p><p>The highlight search routine isn&#039;t using a simple search, so I don&#039;t think the similarity in procedure names is causing the issue.&nbsp; &nbsp;That said, would you mind emailing me the offending source file so I can attempt to determine what exactly is occurring?&nbsp; The names alone aren&#039;t enough to determine what is occurring.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 15 Jan 2014 12:07:57 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1226#p1226</guid>
		</item>
		<item>
			<title><![CDATA[SF 2.9 FILE OUTLINE HIGHLIGHT ERROR]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=1225#p1225</link>
			<description><![CDATA[<p>Hi Jeff,</p><p>The SF 2.9 File Outline process does not appear to highlight the correct Function in certain instances.</p><p>For example, when selecting the function &#039;ch_is_control&#039;&nbsp; in a file containing several functions and subroutines,</p><p>function ch_is_control ( c )<br />.<br />.<br />end function ch_is_control</p><p>the following subroutine is incorrectly highlighted instead,</p><p>subroutine s_control_blank ( s )<br />.<br />.<br />end subroutine s_control_blank</p><p>SF&#039;s highlight search routine appears to identify the letters &#039;s_control&#039; which exists within both routine names and not &#039;ch_is_control&#039; itself.</p><p>Frank</p>]]></description>
			<author><![CDATA[null@example.com (drfrank)]]></author>
			<pubDate>Wed, 15 Jan 2014 01:25:47 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=1225#p1225</guid>
		</item>
	</channel>
</rss>
