title: Fortran: Array of pointer arrays?
body: <p>I'm working with some Fortran code (which I'd never used until this project...) and have come up against a problem. I need to share some memory space with another program. To get Fortran to recognise each memory chunk I use the following code:</p>
  
  <pre><code>       do 10 i = 0, 5 
         CALL C_F_POINTER(TRANSFER(memory_location +
         : VarNamesLoc_(i), 
         : memory_location_cptr) , VarNames_(i), [3]) 
         exit 
      10 continue
  </code></pre>
  
  <p>Where: </p>
  
  <p>VarLoc(i) is an integer representing the memory location </p>
  
  <p>VarNames(i) ?Array of pointer arrays?</p>
  
  <p>The problem I'm having is creating the VarNames array of pointer arrays. I've found some sample code from my googling but I find Fortran quite difficult to understand!! Can anyone show me how to set up an array of pointer arrays? Or point out an alternative if I'm approaching the problem incorrectly?</p>
  
  <p>For reference the Fortran code is written in free form and uses an intel compiler</p>
  
  <p>Thanks for any help!</p>