<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — debug help with iFs and DOs]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=983</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=983&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in debug help with iFs and DOs.]]></description>
		<lastBuildDate>Fri, 13 Jun 2025 22:15:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: debug help with iFs and DOs]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=4455#p4455</link>
			<description><![CDATA[<p>Yes - having an algorithm determine what I intended with my indents and parentheses would be challenging. As I suspected, the problem was not with a missing EndDo - the compiler error message - it was caused by a missing endif.</p><p>One solution is for me to become more familiar with using the Modules, so I can move units of working code out of the &quot;production&quot; path.</p><p>I recall one compiler package that used different colored vertical trace lines for the If/endif, or do/enddo (and other pairs). SimplyFortran has vertical tab lines but not trace lines - like the vertical tab lines, but tied to any if/endif pair.</p><p>If those lines were there, I could easily trace any IF to its EndIF mate. If there was a missing Endif, one of those IF lines would down all the way to bottom of the program.</p><p>If a parentheses was missing between an If and an EndIF (or a Do and EndDo), perhaps that If/EndIF could be given a different color.</p><p>As I recall, the user was not bothered with picking/specifying the trace line color scheme or choice - it didn&#039;t matter. Its only job was to indicate, &quot;... this starts here and ends there.&quot;</p><p>The simplicity - no, I&#039;m not volunteering to add it to the compiler <img src="https://forums.approximatrix.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> - is that there is no dependency on understanding the program logic. Each IF gets a trace, each Do gets a trace, etc. The innermost IF pairs with the first EndIF it encounters.</p><p>Just a thought.&nbsp; Thank you for the consideration.</p>]]></description>
			<author><![CDATA[null@example.com (designer)]]></author>
			<pubDate>Fri, 13 Jun 2025 22:15:50 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=4455#p4455</guid>
		</item>
		<item>
			<title><![CDATA[Re: debug help with iFs and DOs]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=4454#p4454</link>
			<description><![CDATA[<p>Trying to sort out missing <strong>END</strong> statements can be particularly frustrating, and our compiler can produce frustrating messages that don&#039;t point to the originating <strong>DO</strong> or equivalent statement.&nbsp; </p><p>A &quot;syntax checker&quot; window is interesting but complicated.&nbsp; How would it handle variables?&nbsp; Would you need to include entire subroutines or functions?&nbsp; Just an arbitrary block of code would almost certainly produce errors from undeclared variables or miss errors by assuming implicit declarations.&nbsp; There&#039;d have to be a good amount of thought put into such a tool, which, admittedly, would be quite helpful.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 13 Jun 2025 12:28:04 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=4454#p4454</guid>
		</item>
		<item>
			<title><![CDATA[Re: debug help with iFs and DOs]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=4453#p4453</link>
			<description><![CDATA[<p>I&#039;ll try the &quot;binary search&quot; approach: comment the whole program, then uncomment to make &quot;breaks&quot; at appropriate places—like the first half of the program vs. the last half. That will narrow down the area where the problem occurs.</p><p>Though the error says, &quot;Missing EndDo,&quot; I&#039;m guessing that&#039;s a secondary effect of mismatched parentheses.</p><p>I wonder if a &quot;scratch pad&quot; area for syntax debugging would be handy. Like I could copy/paste a section of code in the SyntaxChecker window, and it would ferret out any problems. Just a thought.</p>]]></description>
			<author><![CDATA[null@example.com (designer)]]></author>
			<pubDate>Thu, 12 Jun 2025 16:52:10 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=4453#p4453</guid>
		</item>
		<item>
			<title><![CDATA[debug help with iFs and DOs]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=4452#p4452</link>
			<description><![CDATA[<p>computer MacMini M4, OS 15.5, SimplyFortran 3.40 build 4427</p><p>I&#039;m spending too much time trying to scan through the code, looking for a mismatched parentheses, or a Do without an EndDo.</p><p>I&#039;d think it would be easy - count all the do&#039;s and count all the EndDo&#039;s. But I&#039;m thinking a mismatched parentheses in an IF/Then construction is messing up the Do/Enddo pairing.</p><p>Is there a tool in SimplyFortran that points more directly to the error. I can imagine it is difficult because the code doesn&#039;t know my intent. I&#039;m trying to use indents to group sections into matching units.</p><p>Just wondering if there&#039;s another way?</p>]]></description>
			<author><![CDATA[null@example.com (designer)]]></author>
			<pubDate>Thu, 12 Jun 2025 02:38:55 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=4452#p4452</guid>
		</item>
	</channel>
</rss>
