title: Fortran - setting kind/precision of a variable at run time
body: <p>Is it possible to make a precision of a variable itself a variable that will be defined at a run time?
  Say, if I try to compile:</p>
  
  <pre><code>      SUBROUTINE FOO( VARIABLE, PRECISION_VALUE )
  
        IMPLICIT NONE
  
        INTEGER(4) :: PRECISION_VALUE
        INTEGER(PRECISION_VALUE) :: VARIABLE
  
        RETURN
        END
  </code></pre>
  
  <p>the compiler output is: </p>
  
  <pre><code>    error #6683: A kind type parameter must be a compile-time constant.   [PRECISION_VALUE]
            INTEGER(PRECISION_VALUE) :: VARIABLE
      --------------^
      compilation aborted for trial.f (code 1)
  </code></pre>
  
  <p>Anyway around it? I understand that not any arbitrary value can be used for <code>KIND</code>, but that's not my concern in this question.</p>