From the NannyMUD documentation
2003-10-11
stack - A generic stack object.
/std/special/stack.h
dot Return top element.
pop Remove top element and return it.
exch Swap top two elements.
push Push an element onto the stack.
dup Duplicate top element.
copy Duplicate n top element.
index Duplicate arbitrary element.
roll Roll n elements up j times
clear Remove all items on the stack.
count Count elements on the stack.
clear_to_mark Clear all elements downto the mark.
count_to_mark Count all elements downto the mark.
mark Push a mark on the stack.
query_mark Get the position of the mark.
This object implements a stack. It is recommended that you clone
it and use the provided functions, but you can also inherit it.
NAME
dot - Return top element.SYNTAX
mixed dot()DESCRIPTION
Return top element.
FUNCTION
NAME
pop - Remove top element.SYNTAX
mixed pop()DESCRIPTION
Remove the top element and return it.
FUNCTION
NAME
exch - Swap top two elements.SYNTAX
mixed exch()DESCRIPTION
Swap top two elements.
FUNCTION
NAME
push - Push an element onto the stack.SYNTAX
mixed push(mixed arg)DESCRIPTION
Push an element onto the stack.
FUNCTION
NAME
dup - Duplicate top element.SYNTAX
mixed dup()DESCRIPTION
Duplicate top element.
FUNCTION
NAME
copy - Duplicate n top element.SYNTAX
mixed copy(int n)DESCRIPTION
Duplicate n top element.
FUNCTION
NAME
index - Duplicate arbitrary element.SYNTAX
mixed index(int n)DESCRIPTION
Duplicate arbitrary element.
FUNCTION
NAME
roll - Roll n elements up j timesSYNTAX
mixed roll(int i, int j)DESCRIPTION
Roll n elements up j times
FUNCTION
NAME
clear - Remove all items on the stack.SYNTAX
void clear()DESCRIPTION
Remove all items on the stack.
FUNCTION
NAME
count - Count elements on the stack.SYNTAX
int count()DESCRIPTION
Count elements on the stack.
FUNCTION
NAME
clear_to_mark - Clear all elements downto the mark.SYNTAX
mixed clear_to_mark()DESCRIPTION
Clear all elements downto the mark.
FUNCTION
NAME
count_to_mark - Count all elements downto the mark.SYNTAX
mixed count_to_mark()DESCRIPTION
Count all elements downto the mark.
FUNCTION
NAME
mark - Push a mark on the stack.SYNTAX
int markDESCRIPTION
Push a mark on the stack.
FUNCTION
NAME
query_mark - Get the position of the mark.SYNTAX
int query_mark()DESCRIPTION
Get the position of the mark.