<?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 Quote:jimdempseyatthecove in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103229#M127250</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;jimdempseyatthecove wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;By the way, your command line for ifort did not include the -fpp option. I am surprised the compiler did not complain about the fpp #'s too.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;I use .F rather than -fpp because other Fortran compilers support the former.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;On Mac is that the filesystem is case-insensitive, so one can get into truly horrible situations when trying to rename files from .f to .F and vice versa, so I default to .F since it is obnoxious to change it later, especially when Git is involved.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 15:07:16 GMT</pubDate>
    <dc:creator>Jeffrey_H_Intel</dc:creator>
    <dc:date>2016-10-06T15:07:16Z</dc:date>
    <item>
      <title>named enum, bind(c)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103221#M127242</link>
      <description>&lt;P class="p1"&gt;Both&amp;nbsp;http://fortranwiki.org/fortran/show/Typed+enumerators and&amp;nbsp;http://docs.cray.com/books/S-3693-36/html-S-3693-36/z1018297010.html show an example of a named enum in Fortran with ISO_C_BINDING.&lt;/P&gt;

&lt;P class="p1"&gt;I cannot build this with Intel 17 or GCC 6.2. &amp;nbsp;Can you please help me understand what I am doing wrong?&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;! enum.F 
      module enumtest
      use iso_c_binding
#if NAMED_ENUM
      enum, bind(c) :: color
        enumerator :: red = 4, blue = 9
        enumerator yellow
      end enum
#else
      enum, bind(c)
        enumerator :: red = 4, blue = 9
        enumerator yellow
      end enum
#endif
      end module enumtest&lt;/PRE&gt;

&lt;PRE class="brush:plain;"&gt;$ ifort -std08 -free -g -warn all -traceback -c enum.F
$ ifort -std08 -free -g -warn all -traceback -DNAMED_ENUM -c enum.F
enum.F(4): error #5082: Syntax error, found '::' when expecting one of: &amp;lt;END-OF-STATEMENT&amp;gt; ;
      enum, bind(c) :: color
--------------------^
enum.F(5): error #6163: This statement is not in the correct order.
        enumerator :: red = 4, blue = 9
--------^
enum.F(6): error #6163: This statement is not in the correct order.
        enumerator yellow
--------^
enum.F(7): error #8131: An END ENUM statement occurred without a corresponding ENUM statement.
      end enum
------^
compilation aborted for enum.F (code 1)&lt;/PRE&gt;

&lt;PRE class="brush:plain;"&gt;$ gfortran-6 -std=f2008 -c enum.F 
$ gfortran-6 -std=f2008 -DNAMED_ENUM -c enum.F 
enum.F:4:6:

       enum, bind(c) :: color
      1
Error: Unclassifiable statement at (1)
enum.F:5:22:

         enumerator :: red = 4, blue = 9
                      1
Error: ENUM definition statement expected before (1)
enum.F:6:18:

         enumerator yellow
                  1
Error: ENUM definition statement expected before (1)
enum.F:7:9:

       end enum
         1
Error: Expecting END MODULE statement at (1)&lt;/PRE&gt;

&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 20:44:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103221#M127242</guid>
      <dc:creator>Jeffrey_H_Intel</dc:creator>
      <dc:date>2016-10-05T20:44:43Z</dc:date>
    </item>
    <item>
      <title>Named enumerations are not</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103222#M127243</link>
      <description>&lt;P&gt;Named enumerations are not part of standard Fortran (2008 or 2015 draft).&amp;nbsp; That wiki page is just a suggestion for future language revisions.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 21:04:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103222#M127243</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2016-10-05T21:04:58Z</dc:date>
    </item>
    <item>
      <title>@Jeff,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103223#M127244</link>
      <description>&lt;P&gt;@Jeff,&lt;/P&gt;

&lt;P&gt;Fyi, another thread at comp.lang.fortran -&amp;nbsp;https://groups.google.com/forum/#!msg/comp.lang.fortran/iWUgXY0UJ4s/BlGjDBhlEgAJ;context-place=forum/comp.lang.fortran&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 13:19:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103223#M127244</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2016-10-06T13:19:14Z</dc:date>
    </item>
    <item>
      <title>Scoped enumerators would be</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103224#M127245</link>
      <description>&lt;P&gt;Scoped enumerators would be nice, though I do not see a distinction between:&lt;/P&gt;

&lt;P&gt;ENUM_TYPE::ENUM_PARAMETER_VAL&lt;/P&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;P&gt;ENUM_TYPE%ENUM_PARAMETER_VAL&lt;/P&gt;

&lt;P&gt;If you wish to remove the scoping, then you could use module scoped parameters&lt;/P&gt;

&lt;P&gt;SUBROUTINE ...&lt;BR /&gt;
	&amp;nbsp; USE COLORS&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;SUBROUTINE...&lt;BR /&gt;
	...&lt;BR /&gt;
	&amp;nbsp; BLOCK&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; USE COLORS&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL FOO(Red, Green, Blue)&lt;BR /&gt;
	&amp;nbsp; END BLOCK&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;SUBROUTINE...&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;USE COLORS, RED=&amp;gt;colorRED, ...&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 14:33:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103224#M127245</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-10-06T14:33:04Z</dc:date>
    </item>
    <item>
      <title>At the risk of sounding like</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103225#M127246</link>
      <description>&lt;P&gt;At the risk of sounding like a broken record - er - a corrupted MP3? - ISO_C_BINDING has nothing whatsoever to do with ENUM, BIND(C) or BIND(C) in general, other than the module and the BIND attribute are both part of C interoperability. Though they have some letters in common, they are not the same thing.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 14:33:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103225#M127246</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-10-06T14:33:35Z</dc:date>
    </item>
    <item>
      <title>By the way, your command line</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103226#M127247</link>
      <description>&lt;P&gt;By the way, your command line for ifort did not include the -fpp option. I am surprised the compiler did not complain about the fpp #'s too.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 14:39:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103226#M127247</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-10-06T14:39:49Z</dc:date>
    </item>
    <item>
      <title>The .F (capital F) file type</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103227#M127248</link>
      <description>&lt;P&gt;The .F (capital F) file type causes fpp to be run implicitly on Linux and MacOS. Similar for .F90 (vs .f90)&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 14:42:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103227#M127248</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-10-06T14:42:50Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103228#M127249</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;At the risk of sounding like a broken record - er - a corrupted MP3? - ISO_C_BINDING has nothing whatsoever to do with ENUM, BIND(C) or BIND(C) in general, other than the module and the BIND attribute are both part of C interoperability. Though they have some letters in common, they are not the same thing.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Sorry, Steve, I keep using ISO_C_BINDING as incorrect shorthand for "all the C interoperability stuff in Fortran 2003." &amp;nbsp;I will try to be better about that.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:04:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103228#M127249</guid>
      <dc:creator>Jeffrey_H_Intel</dc:creator>
      <dc:date>2016-10-06T15:04:29Z</dc:date>
    </item>
    <item>
      <title>Quote:jimdempseyatthecove</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103229#M127250</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;jimdempseyatthecove wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;By the way, your command line for ifort did not include the -fpp option. I am surprised the compiler did not complain about the fpp #'s too.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;I use .F rather than -fpp because other Fortran compilers support the former.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;On Mac is that the filesystem is case-insensitive, so one can get into truly horrible situations when trying to rename files from .f to .F and vice versa, so I default to .F since it is obnoxious to change it later, especially when Git is involved.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:07:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103229#M127250</guid>
      <dc:creator>Jeffrey_H_Intel</dc:creator>
      <dc:date>2016-10-06T15:07:16Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103230#M127251</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The .F (capital F) file type causes fpp to be run implicitly on Linux and MacOS. Similar for .F90 (vs .f90)&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Bad habit (assumption) learned from my earlier Fortran (FORTRAN) programming in Windows.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:38:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103230#M127251</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-10-06T15:38:44Z</dc:date>
    </item>
    <item>
      <title>With some Windows compilers,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103231#M127252</link>
      <description>&lt;P&gt;With some Windows compilers, even if the file is named xyz.f in the directory listing, referring to it as xyz.F in the compiler command line causes the preprocessor to be run. This can be convenient, but it can also be troublesome!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 15:45:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/named-enum-bind-c/m-p/1103231#M127252</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-10-06T15:45:45Z</dc:date>
    </item>
  </channel>
</rss>

