title: Function pointer arrays in Fortran
body: <p>I can create function pointers in Fortran 90, with code like</p>
  
  <pre><code>real, external :: f
  </code></pre>
  
  <p>and then use <code>f</code> as an argument to another function/subroutine. But what if I want an <em>array</em> of function pointers? In C I would just do</p>
  
  <pre><code>double (*f[])(int);
  </code></pre>
  
  <p>to create an array of functions returning double and taking an integer argument. I tried the most obvious,</p>
  
  <pre><code>real, external, dimension(3) :: f
  </code></pre>
  
  <p>but gfortran doesn't let me mix EXTERNAL and DIMENSION. Is there any way to do what I want? (The context for this is a program for solving a system of differential equations, so I could input the equations without having a million parameters in my subroutines.)</p>