[R] Summary on graceful exit from fortran.

Rolf Turner rolf at math.unb.ca
Mon Oct 1 20:51:16 CEST 2001

I had asked for a way of gracefully exiting from a dynamically
loaded subroutine (possibly several levels down) --- without
knocking R over --- if an error condition was detected.

As usual, if there is anything at all reasonable in the question, and
if there exists an answer, Brian Ripley will tell you the answer.

Since Prof. Ripley's answer was already posted to this list, I won't
recapitulate it here.  Let me just say that I tried it (the second
version using a Fortran subroutine which calls a C function) and it
worked.  Since Prof. Ripley supplied explicit code, it was trivial to
implement.  I had to change ***ONE*** line, in the Fortran code:
the declaration ``int nc'' causes the compiler to hiccup (at least on
our system) --- I change it to ``integer nc'' and everying flew

The behaviour provided was EXACTLY what I'd hoped for.

In closing let me (as has been done so often before on this list and
the s-news list --- but it bears repeating) publicly express my
gratitude to Prof. Ripley for his help and wisdom and extensive


						Rolf Turner
						rolf at math.unb.ca
r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list