<?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 &amp;quot;indirect&amp;quot; linked lists in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787845#M30987</link>
    <description>thanks Steve.&lt;BR /&gt;&lt;BR /&gt;Indeed the first code compiles and runs correctly, and the second returns an error - which confused me a bit.&lt;BR /&gt;&lt;BR /&gt;I just wasnt sure if this was some kind of extension. But your explanation re the POINTER made it clear (if somewhat esoteric - eg, why not allow for any accesible type whether or not a component is a POINTER?).&lt;BR /&gt;&lt;BR /&gt;I am still on Intel Fortran 11.0.072. Will be upgrading to VS2010 soon and to the latest 11.X compiler.. before taking the plunge on the new Intel 12 compiler!&lt;BR /&gt;&lt;BR /&gt;dmitri</description>
    <pubDate>Sat, 05 Mar 2011 15:38:42 GMT</pubDate>
    <dc:creator>forall</dc:creator>
    <dc:date>2011-03-05T15:38:42Z</dc:date>
    <item>
      <title>"indirect" linked lists</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787843#M30985</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is the following construct legal in Fortran-95?&lt;BR /&gt;&lt;BR /&gt;! ---&lt;BR /&gt;type parCompObjType&lt;BR /&gt; type(dparType),pointer::par(:) ! parameters&lt;BR /&gt;endtype parCompObjType&lt;BR /&gt;! ---&lt;BR /&gt;type dparType&lt;BR /&gt; type(parCompObjType)::ftran_v2z&lt;BR /&gt;endtype dparType&lt;BR /&gt;! ---&lt;BR /&gt;&lt;BR /&gt;This seems to compile and execute.&lt;BR /&gt;&lt;BR /&gt;But if I switch the order of declarations (which seem symmetric, except for the dimension statement), the compiler complains...&lt;BR /&gt;&lt;BR /&gt;! ---&lt;BR /&gt;
type dparType&lt;BR /&gt;
 type(parCompObjType)::ftran_v2z&lt;BR /&gt;
endtype dparType&lt;BR /&gt;
! ---&lt;BR /&gt;

type parCompObjType&lt;BR /&gt;

 type(dparType),pointer::par(:) ! parameters&lt;BR /&gt;

endtype parCompObjType&lt;BR /&gt;! ---&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;error #6457: This derived type name has not been declared. [PARCOMPOBJTYPE]&lt;BR /&gt;&lt;BR /&gt;Using (a more complex form of) this type of "indirect" linked list would allow me to simplify some of my code very dramatically, and it works on a simplified pilot code, but I am a little hesitant if this could create standard-compliance problems, or have some other problems I might be unaware of ...&lt;BR /&gt;&lt;BR /&gt;could somebody shed some light on this?&lt;BR /&gt;&lt;BR /&gt;thanks in advance.. dmitri&lt;BR /&gt;</description>
      <pubDate>Sat, 05 Mar 2011 12:21:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787843#M30985</guid>
      <dc:creator>forall</dc:creator>
      <dc:date>2011-03-05T12:21:29Z</dc:date>
    </item>
    <item>
      <title>"indirect" linked lists</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787844#M30986</link>
      <description>Your first code is legal Fortran 95 and the current version of Intel Visual Fortran compiles it successfully. Which version are you using?&lt;BR /&gt;&lt;BR /&gt;The key is the POINTER attribute. With that, the type can be "any accessible type". Without it, the type must be previously defined.</description>
      <pubDate>Sat, 05 Mar 2011 14:17:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787844#M30986</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-03-05T14:17:08Z</dc:date>
    </item>
    <item>
      <title>"indirect" linked lists</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787845#M30987</link>
      <description>thanks Steve.&lt;BR /&gt;&lt;BR /&gt;Indeed the first code compiles and runs correctly, and the second returns an error - which confused me a bit.&lt;BR /&gt;&lt;BR /&gt;I just wasnt sure if this was some kind of extension. But your explanation re the POINTER made it clear (if somewhat esoteric - eg, why not allow for any accesible type whether or not a component is a POINTER?).&lt;BR /&gt;&lt;BR /&gt;I am still on Intel Fortran 11.0.072. Will be upgrading to VS2010 soon and to the latest 11.X compiler.. before taking the plunge on the new Intel 12 compiler!&lt;BR /&gt;&lt;BR /&gt;dmitri</description>
      <pubDate>Sat, 05 Mar 2011 15:38:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787845#M30987</guid>
      <dc:creator>forall</dc:creator>
      <dc:date>2011-03-05T15:38:42Z</dc:date>
    </item>
    <item>
      <title>"indirect" linked lists</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787846#M30988</link>
      <description>Sorry, I tested the wrong one. Yes, the second case is not legal Fortran and the compiler correctly complains.</description>
      <pubDate>Sun, 06 Mar 2011 01:15:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787846#M30988</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2011-03-06T01:15:46Z</dc:date>
    </item>
    <item>
      <title>"indirect" linked lists</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787847#M30989</link>
      <description>Often, one needs to define a type which includes as a component pointers
 to other variables of the type being defined (the phrase 
"self-referential" is sometimes used as a label for such types).&lt;BR /&gt;
&lt;BR /&gt;
Consider, for example, a binary tree where each node contains a five-character word, and is defined thus:&lt;BR /&gt;
&lt;BR /&gt;&lt;PRE&gt;[fortran]type tnode
  type (tnode), pointer :: left=&amp;gt;null(),right=&amp;gt;null()
  character(len=5),pointer :: name=&amp;gt;null()
  integer :: count=1
end type tnode
[/fortran]&lt;/PRE&gt; &lt;BR /&gt;Compiling code that contains recursive definitions is hard for 
compilers to do, but if only pointers are used (and if pointers to any 
objects have the same footprint) it is not so hard. &lt;BR /&gt;
&lt;BR /&gt;
You could think of the permitting of pointers to be used this way as an 
invaluable loophole without which many programs would be much more 
difficult to write.</description>
      <pubDate>Sun, 06 Mar 2011 13:38:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/quot-indirect-quot-linked-lists/m-p/787847#M30989</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2011-03-06T13:38:30Z</dc:date>
    </item>
  </channel>
</rss>

