[18883] in s-news-athena
Re: [S] Fortran/C Compilers and S-PLUS
daemon@ATHENA.MIT.EDU (Prof Brian D Ripley)
Fri Aug 6 16:18:41 1999
Date: Fri, 6 Aug 1999 21:07:56 +0100 (BST)
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
To: Andrew Bruce <andrew@statsci.com>
Cc: s-news@wubios.wustl.edu
In-Reply-To: <001801bee042$87853530$16ce3fce@chilmark.statsci.com>
Message-Id: <Pine.GSO.4.05.9908062056450.20236-100000@auk.stats>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 6 Aug 1999, Andrew Bruce wrote:
> There has been some discussion recently regarding compilers and S-PLUS. For
> example...
[...]
> It is true that the dyn.load function works only with the Watcom compilers.
> However, there is another option on Windows/NT for dynamically interfacing C
> or Fortran code with S-PLUS for Windows/NT. If you create a DLL, you can
> load the DLL using the S-PLUS function dll.load. This capability has been
> in S-PLUS for Windows since Version 3.3. Since S-PLUS Version 4.0, such
> DLL's have been able to call internal S-PLUS functions. (In Version 3.3,
> only code compiled with the Watcom compilers and loaded with dyn.load or the
> LOAD utility could call internal functions. In S-PLUS 4.0 and above, that
> advantage no longer exists.)
Sorry, but as extensive experimentation (documented in the V&R2 programming
complements) shows, it is not at all straightforward to call internal
S-PLUS functions from DLLs. There is still a very large advantage
in using dyn.load. The problem is that the return values of, for
example, unif_rand() are put in different places by different compilers,
and Watcom has an unusual convention. I thought MathSoft was aware of this
by now. It took a day's work, including disassembling code, to find out
how to do this, as Watcom's conventions appear not to be documented in
their manual set. My comments that the DLL interface was not
well-defined were not theoretical ones.
When those of use outside the US actually receive S-PLUS 2000 we will look
up page 579 with interest....
--
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
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news