[Rd] Samples of external code with various compilers?

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Tue Dec 3 07:56:03 2002

On Tue, 3 Dec 2002 Mark.Bravington@csiro.au wrote:

> I can remember hitting several issues with Delphi, that might be applicable
> to other languages too. From simple to complicated (in Delphi), these are:

(Most of these are Windows-specific.)

> how to write a DLL and export procedures (easy).
> how to declare parameters (VAR or pointers to arrays; pretty simple).
> how arrays of >1 dimension map to R arrays (easy).
> what call mode to use for procedures (i.e. stack order and removal of
> parameters; I had always used STDCALL with S and R, and then found I was
> getting bugs with R 1.6.1. So in desperation I eventually changed this at
> random to C-CALL, and things started working again in R-- and continued to
> work in S. To my continued puzzlement, actually.)

Well, that *is* documented.  For R in readme.packages under `Using other
compilers and languages' which is quite a short section.  So if people
don't read what is already there, is there any point in expanding it?

It's also documented for S-PLUS (if that is what you mean by `S': it
reflects a lot of work by Insightful on top of Lucent S4).


Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595