<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — SF Smart Indent?]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=986&amp;type=atom" />
	<updated>2025-06-27T12:30:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=986</id>
		<entry>
			<title type="html"><![CDATA[Re: SF Smart Indent?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4465#p4465" />
			<content type="html"><![CDATA[<p>Frank,</p><p>I&#039;ll have a look.&nbsp; It definitely didn&#039;t do a great job.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2025-06-27T12:30:43Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4465#p4465</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[SF Smart Indent?]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4464#p4464" />
			<content type="html"><![CDATA[<p>Jeff,</p><p>Is it possible to revised SF Smart Indent so that it indents ELSEIF contents correctly?</p><p>!--- For example, using Smart Indent produces the following code:<br />PROGRAM SMART_INDENT&nbsp; &nbsp; <br />&nbsp; &nbsp; IMPLICIT NONE<br />&nbsp; &nbsp; INTEGER, PARAMETER :: SP = KIND(1.E0)<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; INTEGER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: IFLAG<br />&nbsp; &nbsp; REAL(KIND=SP)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: X<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r1 = 1.0<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r2 = 2.0<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r3 = 3.0<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r4 = 4.0<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; X = r1<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; !--- TEST SMART INDENT<br />&nbsp; &nbsp; IF (X == r1) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r1<br />&nbsp; &nbsp; IFLAG = -1<br />&nbsp; &nbsp; ELSEIF (X == r2) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r2<br />&nbsp; &nbsp; IFLAG = +1<br />&nbsp; &nbsp; ELSEIF (X == r3) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r3<br />&nbsp; &nbsp; IFLAG = 2<br />&nbsp; &nbsp; ELSEIF (X == r4) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r4<br />&nbsp; &nbsp; IFLAG = 2<br />&nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- ?<br />&nbsp; &nbsp; &nbsp; &nbsp; IFLAG = 0<br />&nbsp; &nbsp; END IF<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; WRITE(*,&quot;(1X,A,1X,I2)&quot;) &quot;IFLAG=&quot;, IFLAG<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; RETURN<br />END PROGRAM SMART_INDENT</p><p>!--- Original Code prior to Smart Indent:<br />PROGRAM SMART_INDENT&nbsp; &nbsp; <br />&nbsp; &nbsp; IMPLICIT NONE<br />&nbsp; &nbsp; INTEGER, PARAMETER :: SP = KIND(1.E0)<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; INTEGER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: IFLAG<br />&nbsp; &nbsp; REAL(KIND=SP)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:: X<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r1 = 1.0<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r2 = 2.0<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r3 = 3.0<br />&nbsp; &nbsp; REAL(KIND=SP), PARAMETER&nbsp; :: r4 = 4.0<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; X = r1<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; !--- TEST SMART INDENT<br />&nbsp; &nbsp; IF (X == r1) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r1<br />&nbsp; &nbsp; &nbsp; &nbsp; IFLAG = -1<br />&nbsp; &nbsp; ELSEIF (X == r2) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r2<br />&nbsp; &nbsp; &nbsp; &nbsp; IFLAG = +1<br />&nbsp; &nbsp; ELSEIF (X == r3) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r3<br />&nbsp; &nbsp; &nbsp; &nbsp; IFLAG = 2<br />&nbsp; &nbsp; ELSEIF (X == r4) THEN<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- r4<br />&nbsp; &nbsp; &nbsp; &nbsp; IFLAG = 2<br />&nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; !--- ?<br />&nbsp; &nbsp; &nbsp; &nbsp; IFLAG = 0<br />&nbsp; &nbsp; END IF<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; WRITE(*,&quot;(1X,A,1X,I2)&quot;) &quot;IFLAG=&quot;, IFLAG<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; RETURN<br />END PROGRAM SMART_INDENT</p><p>Frank</p>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2025-06-26T11:53:43Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4464#p4464</id>
		</entry>
</feed>
