[18864] in s-news-athena

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

Re: [S] Watcom Compiler, Fortran, and S-Plus

daemon@ATHENA.MIT.EDU (Prof Brian D Ripley)
Thu Aug 5 09:53:37 1999

Date: Thu, 5 Aug 1999 14:49:07 +0100 (BST)
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
To: Michael Prager <Mike.Prager@noaa.gov>
Cc: s-news@wubios.wustl.edu
In-Reply-To: <4.2.0.58.19990804104909.00a43530@mail.bea.nmfs.gov>
Message-Id: <Pine.GSO.4.05.9908051436300.2408-100000@auk.stats>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Thu, 5 Aug 1999, Michael Prager wrote:

> Fortran/S-PLUS interface.  I was disappointed to read (between the lines) 
> that the DLL interface is troublesome, as otherwise it would seem to offer 
> a compiler-independent route to integration.

It might if someone actually defined the interface _and_ compiler writers
abided by that definition! In practice it seems to be `what Visual C++ does
this week'. So it does not even offer a compiler-independent route for
well-written ISO C.

One thing Fortran compilers almost all do in their own sweet
way is character strings, and so passing error messages back from
Fortran linked into S-PLUS is troublesome. If you never make errors
and so can confine attention to Fortran subroutines with integer, real
and double precision arguments, the DLL interface should be well enough
defined for you.  Otherwise you need a Fortran compiler with the 
ability to create C-style character strings, as that is what the Windows
DLLs use.  (I know S-PLUS has XERROR etc, but they depend on a Watcom-style 
interface.)

It seems to me that most of the problems lie with Fortran compilers: hence
my serious suggestion to use f2c and a decent C compiler. (Even g77 has
problems with strings, and that is closely integrated with gcc.)

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

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