Re: [Rd] sys.on.exit not working (PR#7665)

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 08 Feb 2005 - 01:23:40 EST

It is working as documented: there is no on.exit set for str, is there?

      'sys.on.exit()' retrieves the expression stored for use by
      'on.exit' in the function currently being evaluated. (Note that
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
      this differs from S, which returns a list of expressions for the
      current frame and its parents.)

I see you have looked at PR#269, but did not notice the crucial difference: here the current function is str (it is evaluating its arguments), not soe.test.

On Mon, 7 Feb 2005 mark.bravington@csiro.au wrote:

> Full_Name: Mark Bravington
> Version: 2.0.1
> OS: Windows XP
> Submission from: (NULL) (140.79.22.104)
>
>
> 'sys.on.exit()' doesn't seem to be working, since R1.7.1 at least:

Please read the FAQ: we don't want R-bugs clogged up with `doesn't seem to be working' reports, and we do say so.

> soe.test <- function() {
> on.exit( cat( 'In exit code\n'))
> str( sys.on.exit()) # should display "language..." I think
> 12
> }
>
> (A similar bug was apparently fixed for version 0.65!)

One difference being that PR#269 was a bug, and this is not.

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue Feb 08 00:40:21 2005

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:02:44 EST