Re: [Rd] Problem with function in fortran 95

2009-08-14 Thread Simone Giannerini
Fabio, I see two problems with your code: 1. R type numeric corresponds to FORTRAN Real*8 (or double precision) so that line 4 of your mat.f95 becomes: REAL*8 :: x, y, res 2. your R code won't ever succeed because you pass integer matrices (x,y,res) to a subroutine that expects REAL*8 data. you

Re: [Rd] Problem with function in fortran 95

2009-08-12 Thread Göran Broström
Fabio Mathias Corrêa skrev: I am writing a function in fortran 95, but the intrinsic function MATMUL is not working properly. Here's an example. SUBROUTINE mymult(x,y,res,m,n) IMPLICIT NONE INTEGER :: m,n REAL :: x, y, res Is REAL in Fortran 95 the same as "dou