Global Index (short | long) | Local contents | Local Index (short | long)
[ stack, var ] = pop_stack ( stack ) ;
function [ stack, var ] = pop_stack ( stack ) ; Two valid ways to call this routine [ STACK, VAR ] = POP_STACK ( STACK ) [ VAR ] = POP_STACK in the second case, the global stack "GENERAL_STACK" is used
function [ stack, var ] = pop_stack ( stack ) ; if ~((nargin==1)&(nargout<=2)) & ~((nargin==0)&(nargout<=1)); help pop_stack nargin, nargout error('Wrong number of i/o arguments'); end global GENERAL_STACK if nargin == 0; stack = GENERAL_STACK; end [ nt, ns ] = size ( stack ); if nt > 0 var = stack ( 1, : ); stack = stack ( 2:nt, : ); else disp ( ' *** warning : pop empty stack ' ); end; if nargin == 0; GENERAL_STACK = stack; stack = var; end;