<?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 Re: dynamic list Pointer in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/dynamic-list-Pointer/m-p/862800#M69686</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
That's a topic that I am also very interested in. &lt;BR /&gt;&lt;BR /&gt;With the newer IVF 11.1 you can use class (*) pointers. These are polymorphic pointers that can point to any type.&lt;BR /&gt;&lt;BR /&gt;However, as far as I understand, accessing a component of a type is not possible via a class (*) pointer. The only way that I found is to use a SELECT TYPE statement, which adds quite a lot of code and also seems to be slow. &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thomas&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 24 Sep 2009 19:22:05 GMT</pubDate>
    <dc:creator>thomas_boehme</dc:creator>
    <dc:date>2009-09-24T19:22:05Z</dc:date>
    <item>
      <title>dynamic list Pointer</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/dynamic-list-Pointer/m-p/862799#M69685</link>
      <description>I'm tryin to make a dynamic list for generally types, so I don't have to write the list routines for different types, but I'm not sure how that should work, in C, that's easy, since there pointers are different associated, and there is also the possibility to define void, variables.&lt;BR /&gt;I made som trial subroutines, principally it works, but I don't know how to deallocate the items, since I can not make a pointer to an allocatable variable.&lt;BR /&gt;Any Ideas, or existe there something similar to void ?&lt;BR /&gt;&lt;BR /&gt; type my_object&lt;BR /&gt; character(20) name&lt;BR /&gt; character(64) address&lt;BR /&gt; end type&lt;BR /&gt; &lt;BR /&gt; type item&lt;BR /&gt; type(item),pointer:: prev&lt;BR /&gt; type(item),pointer:: next&lt;BR /&gt; integer(4) object_address&lt;BR /&gt; end type&lt;BR /&gt; &lt;BR /&gt; type List&lt;BR /&gt; type(item),pointer:: head&lt;BR /&gt; type(item),pointer:: tail&lt;BR /&gt; integer              size&lt;BR /&gt; end type&lt;BR /&gt; &lt;BR /&gt; subroutine Insert_object(lst, object)&lt;BR /&gt; type(List)      lst&lt;BR /&gt; type(my_object) object&lt;BR /&gt; &lt;BR /&gt; type(item),pointer new_item&lt;BR /&gt; &lt;BR /&gt; allocate(object)&lt;BR /&gt; allocate(new_item)&lt;BR /&gt; &lt;BR /&gt; item%object_address = LOC(object)&lt;BR /&gt; &lt;BR /&gt; call insert_item(lst, item)&lt;BR /&gt; &lt;BR /&gt; end subroutine        &lt;BR /&gt; &lt;BR /&gt; subroutine Get_Object(lst,item, object)&lt;BR /&gt; type(List)         lst&lt;BR /&gt; type(item),pointer item&lt;BR /&gt; type(my_object)    object   ! object associated with item&lt;BR /&gt; &lt;BR /&gt; pointer(address,object)&lt;BR /&gt; address = item%object_address&lt;BR /&gt; &lt;BR /&gt; end subroutine</description>
      <pubDate>Thu, 24 Sep 2009 15:24:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/dynamic-list-Pointer/m-p/862799#M69685</guid>
      <dc:creator>jaeger0</dc:creator>
      <dc:date>2009-09-24T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic list Pointer</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/dynamic-list-Pointer/m-p/862800#M69686</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
That's a topic that I am also very interested in. &lt;BR /&gt;&lt;BR /&gt;With the newer IVF 11.1 you can use class (*) pointers. These are polymorphic pointers that can point to any type.&lt;BR /&gt;&lt;BR /&gt;However, as far as I understand, accessing a component of a type is not possible via a class (*) pointer. The only way that I found is to use a SELECT TYPE statement, which adds quite a lot of code and also seems to be slow. &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thomas&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Sep 2009 19:22:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/dynamic-list-Pointer/m-p/862800#M69686</guid>
      <dc:creator>thomas_boehme</dc:creator>
      <dc:date>2009-09-24T19:22:05Z</dc:date>
    </item>
  </channel>
</rss>

