<?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: Multiline strings in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767707#M20990</link>
    <description>The problem solved,&lt;BR /&gt;&lt;BR /&gt;anthonyrichards,&lt;BR /&gt;I did't noticed that "
"C is equals to &lt;BR /&gt;char(10)//char(13)&lt;B&gt;//char(0)&lt;/B&gt;&lt;BR /&gt;So, the string was wrapped after first char(0) when I passed it to rhe edit box.&lt;BR /&gt;&lt;BR /&gt;Tank you.</description>
    <pubDate>Fri, 03 Mar 2006 15:20:17 GMT</pubDate>
    <dc:creator>dzuba</dc:creator>
    <dc:date>2006-03-03T15:20:17Z</dc:date>
    <item>
      <title>Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767700#M20983</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;I have to create multiline string (for edit box).&lt;BR /&gt;CHARACTER(1000) M_STR&lt;BR /&gt;&lt;BR /&gt;This is what I whant to have:&lt;BR /&gt;M_STR = "111 
 222 
 333"C.&lt;BR /&gt;&lt;BR /&gt;Now:&lt;BR /&gt;S1 = "111"&lt;BR /&gt;S2 = "222"&lt;BR /&gt;S3 = "333"&lt;BR /&gt;&lt;BR /&gt;Two operations below works wrong. I have "111
" as result.&lt;BR /&gt;M_STR = S1 // "
"C // S2 // "
"C // S3&lt;BR /&gt;WRITE(M_STR, *) S1, "
"C, S2, "
"C, S3 &lt;BR /&gt;&lt;BR /&gt;So, how can I concatinate several strings with 
 between them??&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Thu, 02 Mar 2006 23:47:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767700#M20983</guid>
      <dc:creator>dzuba</dc:creator>
      <dc:date>2006-03-02T23:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767701#M20984</link>
      <description>I think you want:&lt;BR /&gt;&lt;BR /&gt;M_STR = TRIM(S1) // "
"C // TRIM(S2) // "
"C // TRIM(S3)</description>
      <pubDate>Fri, 03 Mar 2006 00:04:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767701#M20984</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-03-03T00:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767702#M20985</link>
      <description>&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Steve_Lionel wrote:&lt;BR /&gt;I think you want:&lt;BR /&gt;&lt;BR /&gt;M_STR = TRIM(S1) // "
"C // TRIM(S2) // "
"C // TRIM(S3)&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Steve! Thanks, but I think problem is in "//" operation, not in spaces btrween strings :).&lt;BR /&gt;&lt;BR /&gt;Thees two operations are not equals&lt;BR /&gt;1   M_STR = " 111 " // "
"C // " 222 " // "
"C&lt;BR /&gt;2   M_STR = " 111 
 222 
 "C&lt;BR /&gt;&lt;BR /&gt;in first case the result is " 111 
". &lt;BR /&gt;WHY ?</description>
      <pubDate>Fri, 03 Mar 2006 00:47:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767702#M20985</guid>
      <dc:creator>dzuba</dc:creator>
      <dc:date>2006-03-03T00:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767703#M20986</link>
      <description>You have not shown a buildable example.  When I create one from your excerpts, adding the TRIM, it works for me. Here's my example:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;CHARACTER(1000) M_STR&lt;BR /&gt;character*10 s1, s2, s3&lt;BR /&gt;&lt;BR /&gt;!M_STR = "111 
 222 
 333"C.&lt;BR /&gt;&lt;BR /&gt;!Now:&lt;BR /&gt;S1 = "111"&lt;BR /&gt;S2 = "222"&lt;BR /&gt;S3 = "333"&lt;BR /&gt;&lt;BR /&gt;!Two operations below works wrong. I have "111
" as result.&lt;BR /&gt;M_STR = TRIM(S1) // "
"C // TRIM(S2) // "
"C // TRIM(S3)&lt;BR /&gt;write (*,*) trim(m_str)&lt;BR /&gt;WRITE(M_STR, *) TRIM(S1), "
"C, TRIM(S2), "
"C, TRIM(S3) &lt;BR /&gt;write (*,*) trim(m_str)&lt;BR /&gt;end&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;When I run this I get:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt; 111&lt;BR /&gt; 222&lt;BR /&gt; 333&lt;BR /&gt;  111&lt;BR /&gt; 222&lt;BR /&gt; 333&lt;/PRE&gt;&lt;BR /&gt;(The extra blank in the second example is due to your use of list-directed formatting in the WRITE to M_STR).</description>
      <pubDate>Fri, 03 Mar 2006 00:55:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767703#M20986</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-03-03T00:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767704#M20987</link>
      <description>&lt;P&gt;dzuba,&lt;/P&gt;
&lt;P&gt;How have you declared S1, S2, and S3 ?&lt;/P&gt;
&lt;P&gt;Les&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2006 01:13:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767704#M20987</guid>
      <dc:creator>Les_Neilson</dc:creator>
      <dc:date>2006-03-03T01:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767705#M20988</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;First of all, you are making your strings c-strings by adding 'C' at the end.&lt;/P&gt;
&lt;P&gt;This will cause the concatenated string to end at the first null character it finds, hence you are not getting the concatenated answer you want.&lt;/P&gt;
&lt;P&gt;Secondly, if you want to use the '
' way of generating carriage return and line feed, the whole character string in which they are used MUST be visible to the compiler at compile time, as that is when the '
c' is converted to the CHAR(13) and CHAR(10) characters that are carriage return and line feed. I discovered all this recently when trying to generate a multiline messge for use in MessageBox.&lt;/P&gt;
&lt;P&gt;If you want new lines just use&lt;/P&gt;
&lt;P&gt;character*2 crlf = CHAR(13)//CHAR(10)&lt;/P&gt;
&lt;P&gt;STRING = STRING1//CRLF//STRING2//CRLF//STRING3//char(0)&lt;BR /&gt;&lt;BR /&gt;And so on, where the component STRINGS are NOT terminated with CHAR(0) (the null terminator required at the end of the concatenated string to make it a C-string acceptable to windows functions like MessageBox). Also, TRIM the strings as Steve suggests before using them&lt;/P&gt;
&lt;P&gt;You can also use internal WRITES as&lt;BR /&gt;&lt;BR /&gt;WRITE(MESSAGE, '(a10,A2,A10,A2,A10)' ) string1,crlf,string2,crlf,string3//char(0)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2006 05:22:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767705#M20988</guid>
      <dc:creator>anthonyrichards</dc:creator>
      <dc:date>2006-03-03T05:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767706#M20989</link>
      <description>Doh!  Absolutely right.  Why didn't I notice that?&lt;BR /&gt;&lt;BR /&gt;I'll comment that I like to make CLRF a PARAMETER.</description>
      <pubDate>Fri, 03 Mar 2006 05:45:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767706#M20989</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2006-03-03T05:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline strings</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767707#M20990</link>
      <description>The problem solved,&lt;BR /&gt;&lt;BR /&gt;anthonyrichards,&lt;BR /&gt;I did't noticed that "
"C is equals to &lt;BR /&gt;char(10)//char(13)&lt;B&gt;//char(0)&lt;/B&gt;&lt;BR /&gt;So, the string was wrapped after first char(0) when I passed it to rhe edit box.&lt;BR /&gt;&lt;BR /&gt;Tank you.</description>
      <pubDate>Fri, 03 Mar 2006 15:20:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Multiline-strings/m-p/767707#M20990</guid>
      <dc:creator>dzuba</dc:creator>
      <dc:date>2006-03-03T15:20:17Z</dc:date>
    </item>
  </channel>
</rss>

