[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Documentation for SetAlink, etc



This is the documentation for setalink, and setclink as I now understand them to
be implemented.  Thanks for looking at them so soon.


There are four primitive functions for manipulating the ALINK and CLINK of a
frame.  Combined with the functions for manipulating the structures of a single
frame (stknargs, stkname, setstkname, stkarg, setstkarg, stkargname,
setstkargname) and those for setting up a new frame with specified access and
control links (enveval, envapply), they form a complete set of primitives for
manipulating the control structures of Lisp.  Although all the other functions
can be written in terms of these primitives, the user will usually want to use the
higher level functions described above.

alink[pos, opos) returns a stack pointer to the frame which is referred to by the
access link of the frame specified by pos.  If opos is supplied, and is a
stackpointer, it is reused.  Returns T if the access link points to the top level. 
Same as stknth(1,pos,opos)

clink[pos, opos) returns a stack pointer to the frame which is referred to by the
control link of the frame specified by pos.  If opos is supplied, and is a
stackpointer, it is reused.  Returns T if the control link points to the top level. 
Same as stknth(-1,pos,opos)

setalink[pos, newpos, relflg] sets the alink of the frame specified by pos to be the
frame specified by newpos.  Causes an error if the access chain of the frame
specified by newpos contains the frame specified by pos.  This prevents the user
from accidentally creating a circular access chain.  If there is no error, and relflg
is nonNil, and newpos is a stackpointer, then newpos is released.  Returns pos if
there was no error.

setclink[pos, newpos, relflg] sets the control of the frame specified by pos to be
the frame specified by newpos.  Causes an error if the control chain of the frame
specified by newpos contains the frame specified by pos.  This prevents the user
from accidentally creating a circular control chain.  If there is no error, and
relflg is nonNil, and newpos is a stackpointer, then newpos is released.  Returns
pos if there was no error.