home *** CD-ROM | disk | FTP | other *** search
-
- _F_u_n_c_t_i_o_n_s _t_o _a_c_c_e_s_s _t_h_e _f_u_n_c_t_i_o_n _c_a_l_l _s_t_a_c_k.
-
- sys.call(which=<<see below>>)
- sys.frame(which=<<see below>>)
- sys.nframe()
- sys.function(n=<<see below>>)
- sys.parent(n=1)
-
- sys.calls()
- sys.frames()
- sys.parents()
- sys.on.exit()
-
- _A_r_g_u_m_e_n_t_s:
-
- which : the frame number.
-
- n : the number of frame generations to go back.
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- These functions provide access to environments (frames
- in S-speak) associated with functions further up the
- calling stack. You need access to two different types
- of environments. You need access to the environment
- where the arguments to a function are defined. This is
- what sys.parent does. You also need access to the
- environment where a function is being evaluated this is
- what sys.frame does.
-
- Often sys.parent is the globalEnv or the top-level
- environment. This is given number 1 in the list of
- frames. Each subsequent function evaluation increases
- the frame stack by 1 and the environment for evaluation
- of that function is returned by sys.frame with the
- appropriate index.
-
- sys.call and sys.frame both accept either positive or
- negative values for the argument which. Positive values
- of which count up from frame 1 and negative values are
- count back from frame n.
-
- Notice that even though the sys.xxx functions are
- interpreted their contexts are not counted nor are they
- reported. There is no access to them.
-
- sys.status has not been implemented yet.
-
-