PUSH

Synopsis
PUSH stackname value
Description

Adds a thing to the front of a stack whose name is stackname.

This variable must have a list as its value; the initial value should be the empty list. New members are added at the front of the list. Later, you can POP value off the stack.

Example
MAKE "mystack []
PUSH "mystack 1
PUSH "mystack 2
PUSH "mystack 3
SHOW :mystack
[3 2 1]

SHOW POP "mystack
3

SHOW :mystack
[2 1]

SourceForge.net Logo