On 16-01-2012, at 14:55, David Stevens wrote: > I installed RTools - though I'm unable to use it within R, from the > command prompt the file will compile and create the foo.dll using R CMD > SHLIB foo.f. I simlified to code for fortran IV (?really) compliance > > foo.f: > > Subroutine foo(x) > real x > x = x + 2. > return > end
Fortran IV is not necessary. Fortran77 is ok (and with a lot of compilers you can use things like "enddo" and "do .. while"). Considering your previous posts in this matter, you should declare variable x to be real*8 or double precision. Making x a real implies a real*4 or 32 bit floating point number. And I would use 2.d0 (because I'm paranoid). Windows gurus will have to provide help for solving the other problem. Berend ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.