title: Wrong values when calling function in Fortran
body: <p>I am new to Fortran and have to build an interface between C# and Fortran for that.
  The passing of the argument from C# to Fortran works without problems, but the easier task, passing values inside the Fortran-code does not want to work...</p>
  
  <p>When I want to pass parameters from one Fortran function to another, in this case from VdiFunctionRunner to TGA_810, the called function does not have the correct paramter-values.</p>
  
  <p>This is a stripped down version of my code:</p>
  
  <pre><code>module VdiFunctionRunnerMain
    implicit none
  
    contains       
      integer function VdiFunctionRunner ()
        !DEC$ ATTRIBUTES DLLEXPORT, StdCall :: VdiFunctionRunner
        implicit none      
  
        CHARACTER (256) :: inXTGA, copyXTGA
        CHARACTER (256) :: ARRAY_810(10)
  
        copyXTGA = 'test'      
        nrReturnValues = tga_810(copyXTGA, 1)
        VdiFunctionRunner = nrReturnValues
        return
      end function VdiFunctionRunner
  
      integer function tga_810(xtga, testNr)
        character (256), intent(in)  :: xtga
        integer, intent(in) :: testNr
        tga_810=2
      end function tga_810
  
  end module VdiFunctionRunnerMain
  </code></pre>
  
  <p>As you see the passed values should be 'test' and 1, but in the debugger I get only the first character of the array ('t') and testNr = 0.
  I guess there is no error in writing the code, isn't it?
  When the code is correct, does somebody know if this can be a compiler problem or something like that?</p>
  
  <p>I am using the Intel 11 compiler.</p>
  
  <p>Help is very much appreciated.</p>