title: Initializing constant with variable's value
body: <pre><code>program main
     real, parameter :: a = 1 
     !real :: a
     !a=1
  
     res = func(a)
     write(*,*) res
  
  end program main
  
  function func(a)
     real, parameter :: b=a+1  !(*)
     func = b
     return
  end function func
  </code></pre>
  
  <p>My compiler complains at the line marked (*). Is there a way to set the value of a constant with a value coming outside that function?</p>