title: What is an assumed length character function result, and why should it be avoided?
body: <p>In response to a question <a href="https://stackoverflow.com/q/42787131">about character function results of non-constant length</a>, an answer mentions "assumed length function result" but doesn't go into detail.</p>
  
  <p>If I want to return a character result where the length depends on something else, that answer mentions automatic objects and deferred length as possible approaches:</p>
  
  <pre><code>function deferred_length(x)
    character(*), intent(in)  :: x
    character(:), allocatable :: deferred_length
    deferred_length = x//'!'
  end function
  </code></pre>
  
  <p>or</p>
  
  <pre><code>function automatic(x)
    character(*), intent(in)  :: x
    character(LEN(x)+1)       :: automatic
    automatic = x//'!'
  end function
  </code></pre>
  
  <p>What is an assumed length function result and how does it differ from the forms above?  Further, why is such mention relegated to a footnote?</p>