title: Print string and formatted variable
body: <p>Consider the following program</p>
  
  <pre><code>program foo
      implicit none
      real :: pi
      pi = 3.1415923
      print*, "The value of pi is", pi
  end program foo
  </code></pre>
  
  <p>This gives the output as</p>
  
  <pre><code>The value of pi is 3.1415923
  </code></pre>
  
  <p>But I want the variable to be displayed only up to 2 decimal places, so I tried</p>
  
  <pre><code>print'(f4.2)', "The value of pi is", pi
  </code></pre>
  
  <p>This throws me an error. </p>
  
  <pre><code>Fortran runtime error: Expected REAL for item 1 in formatted transfer, got CHARACTER                                                                                                                                       
  (f4.2)  
  </code></pre>
  
  <p>How do I achieve the following output</p>
  
  <pre><code>The value of pi is 3.14
  </code></pre>