SLUDGE

copyStack


Syntax:

copyStack (theStack);

Purpose:

Copies a stack, creating a new stack with the same contents. The elements will be in reverse order.

Return value:

The return value is the new stack which has been created.

Example:

var myStack = newStack ("A", "B", "C", 1, 100, 'someFile.tga');
var anotherStack = copyStack (myStack);
# anotherStack now contains ('someFile.tga', 100, 1, "C","B", "A");

See also:

The Multi-Purpose Stack / Array / Queue Type

newStack

popFromStack

pushToStack