argument PACKAGE in .C/.Fortran

Prof Brian D Ripley
Fri, 24 Sep 1999 15:50:07 +0100 (BST)

One problem with linking compiled code is getting the symbol from the right
shared library/DLL (hereafter DLL). This actually happened to Guido
Masarotto recently: both leaps and ts had "ss", and leaps got ts's
version (and thereby crashed R).

We have added an argument PACKAGE to .C, .Fortran, .Call and .External,
which confines the symbol search to the named DLL (name without extension).
This in today's R-release, but it is backwards compatible if used as the
last argument (one surplus argument does no harm).  We would like to
encourage package writers to make use of it: R's own code now does.

For future reference, especially for porting projects, tomorrow's version
of R-release also allows passing float/REAL arguments to and from
.C/.Fortran, and has handling of Fortran character strings that
actually works on all the systems I have access to.

Brian Ripley

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: