<?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 Using realloc-lhs with size 0 array in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801581#M37991</link>
    <description>When A is an allocatable array, provided that the option /assume:realloc_lhs is used, the following syntax is correct:&lt;BR /&gt;&lt;BR /&gt;A= [1,2,3]&lt;BR /&gt;&lt;BR /&gt;But how do I allocate A to size 0 (short of a proper ALLOCATE statement)? A = [] does not work (with IVF 11.1). It's a bit of an academic questoin, but for debugging purposes it's quite helpful.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Olivier&lt;BR /&gt;</description>
    <pubDate>Mon, 31 Oct 2011 21:51:19 GMT</pubDate>
    <dc:creator>OP1</dc:creator>
    <dc:date>2011-10-31T21:51:19Z</dc:date>
    <item>
      <title>Using realloc-lhs with size 0 array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801581#M37991</link>
      <description>When A is an allocatable array, provided that the option /assume:realloc_lhs is used, the following syntax is correct:&lt;BR /&gt;&lt;BR /&gt;A= [1,2,3]&lt;BR /&gt;&lt;BR /&gt;But how do I allocate A to size 0 (short of a proper ALLOCATE statement)? A = [] does not work (with IVF 11.1). It's a bit of an academic questoin, but for debugging purposes it's quite helpful.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Olivier&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2011 21:51:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801581#M37991</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2011-10-31T21:51:19Z</dc:date>
    </item>
    <item>
      <title>Using realloc-lhs with size 0 array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801582#M37992</link>
      <description>You might try:&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;A = [ (i, i=1,0) ]&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I do not know why your original statement does not work, but the above creates a zero-length&lt;/DIV&gt;&lt;DIV&gt;array explicitly, so I expect it to do the trick.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Arjen&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Nov 2011 07:18:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801582#M37992</guid>
      <dc:creator>Arjen_Markus</dc:creator>
      <dc:date>2011-11-01T07:18:45Z</dc:date>
    </item>
    <item>
      <title>Using realloc-lhs with size 0 array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801583#M37993</link>
      <description>Put a type-spec in the array-constructor.&lt;BR /&gt;&lt;BR /&gt;A = [ INTEGER :: ]</description>
      <pubDate>Tue, 01 Nov 2011 07:52:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801583#M37993</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2011-11-01T07:52:56Z</dc:date>
    </item>
    <item>
      <title>Using realloc-lhs with size 0 array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801584#M37994</link>
      <description>&lt;P&gt;Thanks Ian - it works! It does look a bit weird, certainly.&lt;BR /&gt;&lt;BR /&gt;Olivier&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2011 14:48:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801584#M37994</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2011-11-01T14:48:37Z</dc:date>
    </item>
    <item>
      <title>Using realloc-lhs with size 0 array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801585#M37995</link>
      <description>&amp;gt;&amp;gt;it works! It does look a bit weird&lt;BR /&gt;&lt;BR /&gt;What is the data type on the rhs with&lt;BR /&gt;&lt;BR /&gt; A = []&lt;BR /&gt;&lt;BR /&gt;?&lt;BR /&gt;&lt;BR /&gt;Fortran does not have a "void" type, but it does have an empty array of (specified) type.</description>
      <pubDate>Wed, 02 Nov 2011 15:47:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801585#M37995</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2011-11-02T15:47:01Z</dc:date>
    </item>
    <item>
      <title>Using realloc-lhs with size 0 array</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801586#M37996</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;It's an INTEGER allocatable array. I was looking for the convenience of A = []. Ian suggestion works.&lt;BR /&gt;&lt;BR /&gt;Olivier</description>
      <pubDate>Wed, 02 Nov 2011 16:24:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-realloc-lhs-with-size-0-array/m-p/801586#M37996</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2011-11-02T16:24:03Z</dc:date>
    </item>
  </channel>
</rss>

