stackClass: An implementation of a stack
Description
An implementation of a stack
Fields
stack
- A list which can directly accessed or accessed through the functions below. The bottom (original) item, set to NULL, should not be modified.
Methods
push(item, name = "")
- Append an
item
to the stack
with an optional name
and return the item
Active Bindings
height
- This will return the length of the
stack
pop
- This will remove the last (most recent) item from the
stack
and return it
pop
- This will return, but not remove, the last (most recent) item from the
stack