Go to the first, previous, next, last section, table of contents.


Class Loop Stack

One Class Loop Stack instance is associated with each job, and contains the procedure call/return stack, local variables, and various state information not directly visible to the programmer.

The name comes from the fact that local variables implicitly created by control constructs, such as the various loops, live on this stack. Forth implementations traditionally refer to this as the "return stack".

There is no way to create instances of this class other than by creating new jobs: The class exists specifically to let the server efficiently distinguish job loop stacks from other sorts of stacks, in support of debugging and security.

Class Loop Stack adds the following properties to those of Class Plain:

$S.vector:   The vector used to actually hold the stack contents.
$S.length:   The current number of occupied slots in the stack.

Note: For convenience, the $S properties are also available in the public (default) propdir.


Go to the first, previous, next, last section, table of contents.