Documentation of push_stack


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

stack = push_stack ( val, stack ) ;

Help text

 function stack = push_stack ( val, stack ) ;

 Two ways to call this routine
   1.   STACK = PUSH_STACK ( VAL, STACK )
   2.           PUSH_STACK ( VAL )

 For the second case, a global stack "GENERAL_STACK" is used,
   no output argument is allowed

 See Also push_temp

Listing of function push_stack

function stack = push_stack ( val, stack ) ;

global GENERAL_STACK

if ( nargin==1 & nargout~=0 ) | ( nargin==2 & nargout~=1 );
  help push_stack
  nargin, nargout
  error('Error in number of i/o arguments');
end

if nargin==1
  GENERAL_STACK = [ val ; GENERAL_STACK ];
else
  stack = [ val ; stack ];
end