<?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 Use size_t in C to declare in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926617#M86781</link>
    <description>&lt;P&gt;Use size_t in C to declare this argument. You can't control the size. You might also look at the Fortran 2003 C interoperability features that would let you avoid passing this argument, though then you would have no size at all.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jun 2013 16:33:43 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2013-06-19T16:33:43Z</dc:date>
    <item>
      <title>Size of hidden string length argument in 64-bits</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926616#M86780</link>
      <description>&lt;P&gt;We are calling into Fortran code from C++, using these compiler arguments: /4I4 /real-size:64 /iface:mixed_str_len_arg&lt;/P&gt;
&lt;P&gt;The code defines:&lt;/P&gt;
&lt;P&gt;typedef unsigned long STRLEN;&lt;BR /&gt;void __stdcall&amp;nbsp;MFSINI( CHARACTER *pword, STRLEN PWORDLEN, INTEGER *ierno,&amp;nbsp;INTEGER *ierrls, CHARACTER *errmes, STRLEN emlen );&lt;/P&gt;
&lt;P&gt;And it works fine in 32-bit mode. But in 64-bit mode it crashes when assigning a string to errmes. It works though if we have:&lt;/P&gt;
&lt;P&gt;typedef __int64 STRLEN;&lt;/P&gt;
&lt;P&gt;Keep in mind that we are using Visual C++ which perversely has unsigned long of four bytes in 32 and 64 bit mode.&lt;/P&gt;
&lt;P&gt;So my question is, there a way to control the size of the hidden string length argument? Is it always 4 bytes in 32-bit mode and 8 bytes in 64-bit mode? (Please confirm the latter). Can you force it to be 4 bytes in 64-bit mode? Is there a /4I4 equivalent to set it?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 15:49:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926616#M86780</guid>
      <dc:creator>van_der_merwe__ben</dc:creator>
      <dc:date>2013-06-19T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Use size_t in C to declare</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926617#M86781</link>
      <description>&lt;P&gt;Use size_t in C to declare this argument. You can't control the size. You might also look at the Fortran 2003 C interoperability features that would let you avoid passing this argument, though then you would have no size at all.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 16:33:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926617#M86781</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-06-19T16:33:43Z</dc:date>
    </item>
    <item>
      <title>Lionel, you are awesome! I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926618#M86782</link>
      <description>&lt;P&gt;Lionel, you are awesome! I should have have thought of size_t!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 16:47:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926618#M86782</guid>
      <dc:creator>van_der_merwe__ben</dc:creator>
      <dc:date>2013-06-19T16:47:16Z</dc:date>
    </item>
    <item>
      <title>The definition for STRLEN is</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926619#M86783</link>
      <description>&lt;P&gt;The definition for STRLEN is not in our code, but rather API files we receive from a vendor, so I shall talk to them about getting it changed. They likely do not see an issue because even though they support 64-bits, only Microsoft Visuall C++ 64 bits has long types that are the same size as they are in 32-bits.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 17:20:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926619#M86783</guid>
      <dc:creator>van_der_merwe__ben</dc:creator>
      <dc:date>2013-06-19T17:20:46Z</dc:date>
    </item>
    <item>
      <title>If this is not your Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926620#M86784</link>
      <description>&lt;P&gt;If this is not your Fortran code, then don't bother them about changing. Using size_t will do what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 17:34:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Size-of-hidden-string-length-argument-in-64-bits/m-p/926620#M86784</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2013-06-19T17:34:48Z</dc:date>
    </item>
  </channel>
</rss>

