next up previous contents
Next: The pretty print Up: CHAPTER.3: PROCEDURES AND Previous: "->" does not

The print arrow "=>"

The print arrow is very commonly used to show what is on the stack. It has two different uses, one inside procedures and one at "top level" i.e. when you are giving individual commands to Pop-11.

    1. In a procedure "=>" prints only one item, the one on top of the
       stack, and removes it from the stack.

    2. At "top level" "=>" prints out everything on the stack, bottom
       item first, top item last, and clears the stack.
The reason for the restriction in (1) is that when procedures are running there may be several items on the stack waiting to be dealt with by other procedures than the one that calls =>. So those items should not be removed. (This restriction can be overcome by using the popval procedure to simulate top level instructions, in the format: popval( [=>] );

But that's recommended only for experienced programmers.)



Aaron Sloman
Fri Jan 2 03:17:44 GMT 1998