<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I guess, the first program in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156870#M141812</link>
    <description>&lt;P&gt;I guess, the first program should read: (added program statement and declarations, so it can be compiled)&lt;/P&gt;

&lt;P&gt;program p&lt;BR /&gt;
	logical test, test2&lt;BR /&gt;
	if (test .eqv. .true. .and. &amp;amp;&lt;BR /&gt;
	test2 .eqv. .true.) then&lt;BR /&gt;
	test = .false.&lt;BR /&gt;
	endif&lt;BR /&gt;
	if (test .eqv. .true.) then; test = .false.; else; test2 = .false.; endif&lt;BR /&gt;
	continue&lt;BR /&gt;
	end&lt;/P&gt;

&lt;P&gt;Indeed, as mecej4 noted, use .eqv. in stead of == and use if(test) then ...&lt;/P&gt;

&lt;P&gt;findent (https://sourceforge.net/projects/findent/) indents the program as follows:&lt;/P&gt;

&lt;P&gt;program p&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; logical test, test2&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; if (test .eqv. .true. .and. &amp;amp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test2 .eqv. .true.) then&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test = .false.;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; if (test .eqv. .true.) then; test = .false.; else; test2 = .false.; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; continue&lt;BR /&gt;
	end&lt;/P&gt;

&lt;P&gt;which is more or less what you want.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 Sep 2018 11:53:11 GMT</pubDate>
    <dc:creator>willem_v_</dc:creator>
    <dc:date>2018-09-29T11:53:11Z</dc:date>
    <item>
      <title>Visual Studio Auto Code Indentation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156868#M141810</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;This concerns the auto indenting possible in Visual Studio via the Ctrl-K-D command. Current we have the indenting option set to the 'smart' in 'Tools | Options | Text Editor | Fortran | Tabs'.&lt;/P&gt;

&lt;P&gt;There are two scenarios where the formatting is wrong:&lt;/P&gt;

&lt;P&gt;1. Line continuations in an if condition. e.g.:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;if (test == .true. .and. &amp;amp;
test2 == .true)
! Ctrl-K-D places the below inline with the if, no indent.
test = .false;
      ! Would prefer to be indented as below instead
      test = .false;
endif&lt;/PRE&gt;

&lt;P&gt;2. Another issue is when we use the ';' to have an if statement on the one line (because we can!). Using Ctrl-K-D incorrectly indents the subsequent code.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;if (test == .true.) then; test = .false.; else; test2 = .false.; endif
       ! Next line is indented when it should not be&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Has anyone encountered this issue and found a solution?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 03:43:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156868#M141810</guid>
      <dc:creator>OMeara__Mark</dc:creator>
      <dc:date>2018-03-21T03:43:36Z</dc:date>
    </item>
    <item>
      <title>I cannot help you with the VS</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156869#M141811</link>
      <description>&lt;P&gt;I cannot help you with the VS editor question, but I notice some problems with the code that you showed. Please read #7 of Dr. Fortran's post,&amp;nbsp;&lt;SPAN style="font-size: 19.512px;"&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/275071#comment-1548435" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/275071#comment-1548435&lt;/A&gt;, in which he discusses why the == operator should not be used with logical expressions (use .EQV. instead). Instead of "if(test == .true.)", you could probably use the correct and shorter "if(test)".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:22:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156869#M141811</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-03-21T20:22:21Z</dc:date>
    </item>
    <item>
      <title>I guess, the first program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156870#M141812</link>
      <description>&lt;P&gt;I guess, the first program should read: (added program statement and declarations, so it can be compiled)&lt;/P&gt;

&lt;P&gt;program p&lt;BR /&gt;
	logical test, test2&lt;BR /&gt;
	if (test .eqv. .true. .and. &amp;amp;&lt;BR /&gt;
	test2 .eqv. .true.) then&lt;BR /&gt;
	test = .false.&lt;BR /&gt;
	endif&lt;BR /&gt;
	if (test .eqv. .true.) then; test = .false.; else; test2 = .false.; endif&lt;BR /&gt;
	continue&lt;BR /&gt;
	end&lt;/P&gt;

&lt;P&gt;Indeed, as mecej4 noted, use .eqv. in stead of == and use if(test) then ...&lt;/P&gt;

&lt;P&gt;findent (https://sourceforge.net/projects/findent/) indents the program as follows:&lt;/P&gt;

&lt;P&gt;program p&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; logical test, test2&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; if (test .eqv. .true. .and. &amp;amp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test2 .eqv. .true.) then&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test = .false.;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; if (test .eqv. .true.) then; test = .false.; else; test2 = .false.; endif&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; continue&lt;BR /&gt;
	end&lt;/P&gt;

&lt;P&gt;which is more or less what you want.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Sep 2018 11:53:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Visual-Studio-Auto-Code-Indentation/m-p/1156870#M141812</guid>
      <dc:creator>willem_v_</dc:creator>
      <dc:date>2018-09-29T11:53:11Z</dc:date>
    </item>
  </channel>
</rss>

