Search                        Top                                  Index
HELP CHAINFROM                           J. Gibson 1981
                                         R. Barrett, January 1986

    chainfrom(<procedure1 | call stack length>, <procedure2>)

CHAINFROM takes two arguments.

  1. a target procedure to chain to, or a call stack length (e.g.
        the result of *CALLSTACKLENGTH) implicitly identifying a
        target procedure. (procedure 1)
  2. a procedure to run. (procedure 2)

When CHAINFROM is called, the calling stack is unwound to the first
argument. From there a CHAIN is made to the second argument, which is
always a procedure. When the (if) the second procedure finishes, control
unwinds up the calling stack, as normal.

The first argument may be either an actual procedure (in which case
exiting terminates on reaching a call of the given procedure), or a call
stack length as returned by *CALLSTACKLENGTH (in which case exiting
terminates when the call stack length is equal or less than the given

-- RELATED DOCUMENTATION ----------------------------------------------

Other non-standard control structures:
    HELP *CALLER    - identifies a single caller at a specified level
    HELP *INTERRUPT - On POP-11 interrupt procedures
    HELP *CONTROL - for a summary of control structures in POP-11
    REF  *PROCEDURE - details of the nature of procedures in POP-11

--- C.all/help/chainfrom -----------------------------------------------
--- Copyright University of Sussex 1987. All rights reserved. ----------