[18882] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] Fortran/C Compilers and S-PLUS

daemon@ATHENA.MIT.EDU (Andrew Bruce)
Fri Aug 6 15:44:19 1999

Reply-To: <andrew@statsci.com>
From: "Andrew Bruce" <andrew@statsci.com>
To: <s-news@wubios.wustl.edu>
Date: Fri, 6 Aug 1999 12:33:14 -0700
Message-Id: <001801bee042$87853530$16ce3fce@chilmark.statsci.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


There has been some discussion recently regarding compilers and S-PLUS. For
example...

On Fri, 09 Jul 1999 at 09:53:50 -0500, Clark Sims
<clark.sims@worldnet.att.net> wrote:
>To: s-news@wubios.wustl.edu
> >Subject: [S] Death of Watcom Fortran / C / C++ / Power++
> ....
>Sybase has decided to discontinue the sales of the Watcom compilers. If
>you want to use dyn.load, the watcom compiler is the only one that you
>can use. The sales will continue until August 31, 1999.

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.)

To our knowledge, with one exception, there are no difficulties in using
DLL's to interface S-PLUS with C and Fortran code.  The exception concerns
handling strings in Fortran (as Prof. Ripley points out, this is mostly a
Fortran compiler issue).  The S-PLUS 2000 Programmers Manual gives a
solution to handling strings for error messages in Fortran that should work
with any Fortran compiler (see p. 579).

DLL's can be created using virtually any 32-bit compiler, although the
details are generally compiler-specific. The S-PLUS 2000 Programmer's Guide
(chapter 16) gives detail on the process for the Watcom compilers and
Microsoft Visual C++.  MathSoft will continue to support loading of DLL's in
future versions of S-PLUS.

S-PLUS 5, the latest release for UNIX and LINUX based on the S Version 4
Language, uses an improved standard method for interfacing to C and Fortran
code using dynamic link libraries.  The process for loading is simpler and
is integrated with the library and attach functions.   This new process
replaces the dyn.load function which is not supported in the S Version 4
language.

Previous versions of S-PLUS for Windows/NT were compiled using Watcom
compilers.  The next version of S-PLUS that incorporates the S Version 4
Language will be compiled using Microsoft Visual C++ and Digital/Compaq
Fortran.  You can still use your Watcom compiler, or any other 32-bit
compiler, to interface with C and Fortran code in this version.  MathSoft is
investigating the development of AppWizards for Microsoft Visual Studio to
help build your S-PLUS chapter.


==========================================
Andrew G. Bruce
Senior Product Marketing Manager
MathSoft, Inc.                 Tel:    206.283.8802 x 248
1700 Westlake Ave              Fax:  206.283.8691
Suite 500                      Cell:  206.310.9994
Seattle, WA 98109-3044         E-mail: andrew@statsci.com
www.mathsoft.com/splus
==========================================

-----------------------------------------------------------------------
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

home help back first fref pref prev next nref lref last post