home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / sys.parent < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.7 KB  |  50 lines

  1.     
  2.     _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.
  3.     
  4.          sys.call(which=<<see below>>)
  5.          sys.frame(which=<<see below>>)
  6.          sys.nframe()
  7.          sys.function(n=<<see below>>)
  8.          sys.parent(n=1)
  9.     
  10.          sys.calls()
  11.          sys.frames()
  12.          sys.parents()
  13.          sys.on.exit()
  14.     
  15.     _A_r_g_u_m_e_n_t_s:
  16.     
  17.            which : the frame number.
  18.     
  19.                n : the number of frame generations to go back.
  20.     
  21.     _D_e_s_c_r_i_p_t_i_o_n:
  22.     
  23.          These functions provide access to environments (frames
  24.          in S-speak) associated with functions further up the
  25.          calling stack.  You need access to two different types
  26.          of environments.  You need access to the environment
  27.          where the arguments to a function are defined. This is
  28.          what sys.parent does.  You also need access to the
  29.          environment where a function is being evaluated this is
  30.          what sys.frame does.
  31.     
  32.          Often sys.parent is the globalEnv or the top-level
  33.          environment.  This is given number 1 in the list of
  34.          frames. Each subsequent function evaluation increases
  35.          the frame stack by 1 and the environment for evaluation
  36.          of that function is returned by sys.frame with the
  37.          appropriate index.
  38.     
  39.          sys.call and sys.frame both accept either positive or
  40.          negative values for the argument which. Positive values
  41.          of which count up from frame 1 and negative values are
  42.          count back from frame n.
  43.     
  44.          Notice that even though the sys.xxx functions are
  45.          interpreted their contexts are not counted nor are they
  46.          reported. There is no access to them.
  47.     
  48.          sys.status has not been implemented yet.
  49.     
  50.