function s = stack
%STACK constructor for stack object
% stack is a data structure based on the principle of 
% Last In First Out (LIFO)
%
% usage:
%   s  = stack    - Default constructor, empty stack table
%
% example:
%   s = stack 
%   s = push(q, [1:2])
%   s = push(q, ones(1,5))
%   s = pop(s)
%   e = element(s)
%   s = push(s, zeros(1,3))
%   e = top(s)
%   etc ...
%
% $Id$

% constructor
% ----------------
if nargin == 0  
  self.stack_pointer = {};
  self.element = {};
else
  error('stack:stack', 'Invalid arguments.');
end

% class constructor
% -----------------
s = class(self,'stack');
