next up previous contents
Next: Exercise Up: CHAPTER.3: PROCEDURES AND Previous: Defining updaters

Non-destructive assignment "->>"

The normal assignment arrow REMOVES the top item of the stack. It is sometimes convenient to assign the top element of the stack yet leave it there. This is done with the arrow "->>". For instance this can be used to assign the same thing to several different variables:

    0 ->> x ->> y -> z;
This puts 0 on the stack, then COPIES the top of the stack into x, then COPIES the top into y the MOVES the top of the stack into z.



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