[Rd] Port of R header files to Delphi

Duncan Murdoch dmurdoch@pair.com
Wed, 21 Jun 2000 00:51:24 GMT

I'm in the process of porting R header files to Delphi.  The short
term aim is to be able to make calls into the R.dll from Delphi; the
longer term aim is to play around with writing a Windows front-end
with some of the features of the S-PLUS environment (e.g. scripts),
and other features from other IDEs I've used (e.g. watch windows,
popup values of variables selected by mouse, etc.)

I've got a port of the simple rterm.c sample front-end sort of
working, but I need lower level access, and I'm having trouble getting
any further.  Is this the place to ask technical questions on this, or
should I ask somewhere else (or just not bug everyone, since I'm not
working on Unix or in C)?

For example:

1.  Syntax errors are causing my rterm to shut down, apparently
because I'm not catching the exceptions that are thrown.  How are
exceptions thrown?

2.  If I want to get R to give me a string showing how an existing
variable would be printed, what's the normal procedure?  I tried
calling "PrintValue", passing it the Rinternals export
"R_LastvalueSymbol", but I just get an access violation in R.DLL.
This could be because I'm not handling the export properly (DLLs
normally export entry points, not pointers to variables, so I had to
try to guess what indirection was being used here).  Or I could be
calling PrintValue at the wrong time.  Or something else.  How much
needs to be set up in advance before PrintValue will work?

Duncan Murdoch
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch