[R] Understanding dsyrk_ in C code

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 7 21:16:13 CET 2009


Douglas Bates wrote:

[...]

> If you are wondering what the difference between F77_SUB and F77_NAME
> might be, there isn't a difference in R.  Long, long ago there was a
> difference between the two macros in S and S-PLUS related to a
> peculiar Fortran compiler, if I recall correctly.  Most of the time
> these macros simply append an underscore to the name but there may
> still be cases where something else occurs and it is best to allow for
> those cases.

Yes. definitely

1) There are several Fortran compilers that do not append an underscore, 
and others that only so so on some platforms.

2) Most change case.  Most to lower case, a few to upper case (and I am
not sure R always copes with those).

3) Some formerly prominent Fortran 77 compilers (e.g. g77) used to treat 
names containing an underscore differently (e.g. append two underscores).


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list