No subject

Robert Gentleman rgentlem@stat.auckland.ac.nz
Mon, 18 May 1998 12:11:17 +1200 (NZST)


> Thomas Lumley <thomas@biostat.washington.edu> writes:
> 
> > I think the debugger doesn't stop and wait because it has problems with
> > functions that don't have braces {} enclosing them.
> 
> Oh. And here I was, thinking that it was due to some aspect of the
> implementation of method dispatching...
> 
> You're absolutely right:
> > f<-function(x)x
> > debug(f)
> > f(3)
> debugging in: f(3)
> exiting from: f(3)
> [1] 3
> 

  Yep, if you have a look we check the debug flag in do_begin (if an opening
  {), short functions don't have these. My recollection is that Splus puts
  one on every function but we decided not to. The debug flag is in
  the header of the actual function SEXP (look in src/include/Defn.h).
  
  Most of the behaviour of debug is in eval.c (do_while, do_for, and friends).
  
  
  robert
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._