Skip to content
Prev 36988 / 63424 Next

Use of .Fortran

Prof Brian Ripley wrote:
I think most compilers only distinguish two fortran file extensions: .f or
.f90.  .f denotes fixed-form source code while .f90 denotes free-form.  Some
compilers also take the capitalized versions, .F and .F90, to indicate
source code that must be run through a preprocessor.

It is a little weird, but Fortran file extensions have nothing to do with
the year of the language standard the code is to be compiled against.
David Scott wrote:
When calling a Fortran function for R, for each argument that appears in the
subroutine declaration:

  subroutine subName(...arg list...)

You *must* provide a matching input to the .Fortran() call:

  .Fortran("subName", ...arg list...)

In the case of arrays that are filled by the Fortran subroutine, just pass
an empty vector of the appropriate length- perhaps created using the
double() function.

-Charlie

-----
Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University