<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — debug help with iFs and DOs]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=983&amp;type=atom" />
	<updated>2025-06-13T22:15:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=983</id>
		<entry>
			<title type="html"><![CDATA[Re: debug help with iFs and DOs]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4455#p4455" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[designer]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3903</uri>
			</author>
			<updated>2025-06-13T22:15:50Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4455#p4455</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: debug help with iFs and DOs]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4454#p4454" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2025-06-13T12:28:04Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4454#p4454</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: debug help with iFs and DOs]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4453#p4453" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[designer]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3903</uri>
			</author>
			<updated>2025-06-12T16:52:10Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4453#p4453</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[debug help with iFs and DOs]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4452#p4452" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[designer]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3903</uri>
			</author>
			<updated>2025-06-12T02:38:55Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4452#p4452</id>
		</entry>
</feed>
