Stack

Stack is a type of collective data that stores data in a "first in, last out" manner. "stack" is not a keyword, but a built-in function name. To create an empty stack, call the stack function

   s = stack();

To push an item into the stack,

   s.push(x);

To pop the top item out of the stack

   x = s.pop();

To check the height of the stack

   s.height;



oz 2009-12-22