<?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 initializing character arrays in a structure in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/initializing-character-arrays-in-a-structure/m-p/976300#M25055</link>
    <description>I would like to initialize the contents of some character arrays in a data structure, but can't figure out how. Advice is welcome!!  &lt;BR /&gt;  &lt;BR /&gt;Here is the data structure:  &lt;BR /&gt;  &lt;BR /&gt;TYPE LMRT_STR  &lt;BR /&gt;  INTEGER            :: SPP  &lt;BR /&gt;  CHARACTER (LEN=15) :: PRETTYNAME(10)   &lt;BR /&gt;  REAL               :: COEF(8)  &lt;BR /&gt;END TYPE  &lt;BR /&gt;  &lt;BR /&gt;and here is an example of how one of these structures is initialized in a DATA statement.  &lt;BR /&gt; &lt;BR /&gt;      TYPE (LMRT_STR) LMRT(32)  &lt;BR /&gt;      DATA (LMRT(I), I=1,32) /   &lt;BR /&gt;     &amp;gt;  LMRT_STR (  &lt;BR /&gt;     &amp;gt;     3,  &lt;BR /&gt;     &amp;gt;    (/'ICHmk1/03',  'ICHmk1/04', 'ICHmk2/01', 'ICHmk2/03',  &lt;BR /&gt;     &amp;gt;      'ICHmw3/03' /),  &lt;BR /&gt;     &amp;gt;    (/-4.906955, -2.476706, -0.257206,  0.004187,  1.081121,  &lt;BR /&gt;     &amp;gt;       0.144035, -0.341321, -0.000008 /)),  &lt;BR /&gt;// etc.  &lt;BR /&gt; &lt;BR /&gt;The second component of the structure, 'PRETTYNAME', is a set of up to 10 character strings, each of length 15. What I want to do is to initialize the unused character strings (with a blank and not nulls). There are 5 unused character arrays in the example above. I can't find any help about the syntax that would allow this. The integer example would be  &lt;BR /&gt;  &lt;BR /&gt;  5*0  &lt;BR /&gt;  &lt;BR /&gt;to set 5 integers to 0; is there something like this for the character arrays?</description>
    <pubDate>Wed, 05 Dec 2001 12:05:34 GMT</pubDate>
    <dc:creator>Robinson__Donald</dc:creator>
    <dc:date>2001-12-05T12:05:34Z</dc:date>
    <item>
      <title>initializing character arrays in a structure</title>
      <link>https://community.intel.com/t5/Software-Archive/initializing-character-arrays-in-a-structure/m-p/976300#M25055</link>
      <description>I would like to initialize the contents of some character arrays in a data structure, but can't figure out how. Advice is welcome!!  &lt;BR /&gt;  &lt;BR /&gt;Here is the data structure:  &lt;BR /&gt;  &lt;BR /&gt;TYPE LMRT_STR  &lt;BR /&gt;  INTEGER            :: SPP  &lt;BR /&gt;  CHARACTER (LEN=15) :: PRETTYNAME(10)   &lt;BR /&gt;  REAL               :: COEF(8)  &lt;BR /&gt;END TYPE  &lt;BR /&gt;  &lt;BR /&gt;and here is an example of how one of these structures is initialized in a DATA statement.  &lt;BR /&gt; &lt;BR /&gt;      TYPE (LMRT_STR) LMRT(32)  &lt;BR /&gt;      DATA (LMRT(I), I=1,32) /   &lt;BR /&gt;     &amp;gt;  LMRT_STR (  &lt;BR /&gt;     &amp;gt;     3,  &lt;BR /&gt;     &amp;gt;    (/'ICHmk1/03',  'ICHmk1/04', 'ICHmk2/01', 'ICHmk2/03',  &lt;BR /&gt;     &amp;gt;      'ICHmw3/03' /),  &lt;BR /&gt;     &amp;gt;    (/-4.906955, -2.476706, -0.257206,  0.004187,  1.081121,  &lt;BR /&gt;     &amp;gt;       0.144035, -0.341321, -0.000008 /)),  &lt;BR /&gt;// etc.  &lt;BR /&gt; &lt;BR /&gt;The second component of the structure, 'PRETTYNAME', is a set of up to 10 character strings, each of length 15. What I want to do is to initialize the unused character strings (with a blank and not nulls). There are 5 unused character arrays in the example above. I can't find any help about the syntax that would allow this. The integer example would be  &lt;BR /&gt;  &lt;BR /&gt;  5*0  &lt;BR /&gt;  &lt;BR /&gt;to set 5 integers to 0; is there something like this for the character arrays?</description>
      <pubDate>Wed, 05 Dec 2001 12:05:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/initializing-character-arrays-in-a-structure/m-p/976300#M25055</guid>
      <dc:creator>Robinson__Donald</dc:creator>
      <dc:date>2001-12-05T12:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: initializing character arrays in a structure</title>
      <link>https://community.intel.com/t5/Software-Archive/initializing-character-arrays-in-a-structure/m-p/976301#M25056</link>
      <description>An example of an array with LEN=15 and SHAPE = (/10/) is: &lt;BR /&gt;&lt;PRE&gt;&lt;FONT size="+0"&gt; 
spread(repeat(achar(32),15),1,10) 
&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Dec 2001 14:39:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/initializing-character-arrays-in-a-structure/m-p/976301#M25056</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-12-05T14:39:48Z</dc:date>
    </item>
  </channel>
</rss>

