title: Return an array of strings of different length in Fortran
body: <p>I would like to create a type to contain an array of strings in Fortran without explicitly assigning lengths so I can return it from a function. </p>
  
  <p>The following is my type:</p>
  
  <pre><code>type returnArr
      Character (*), dimension(4)  :: array
  end type returnArr
  </code></pre>
  
  <p>The following is the function's signature:</p>
  
  <pre><code>type(returnArr) FUNCTION process(arr, mean, stdDev) result(j)
  </code></pre>
  
  <p>The following is where I try set the result:</p>
  
  <pre><code>j%array(1)= "Test"
  </code></pre>
  
  <p>But all I get is the following error:</p>
  
  <pre><code>Error: Character length of component ‘array’ needs to be a constant specification expression at (1)
  </code></pre>
  
  <p>How can I declare the type so that the strings may be of different length?</p>