Documentation of popd


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


Function Synopsis

popd ( silent ) ;

Help text

 function popd ( silent ) ;

 simulate unix commands PUSHD and POPD in matlab

 SILENT : do not show DIR_STACK after processing

----------------------------------- Alexis Lau (7/8/93)

Cross-Reference Information

This function is called by

Listing of function popd

function popd ( silent ) ;

  global DIR_STACK

  if isempty(DIR_STACK);
    error('POPD: directory stack is empty');
  end

  dir = sscanf(DIR_STACK,'%s',1);

  eval(['cd ' dir ]);

  DIR_STACK = DIR_STACK( length(dir)+2 : length(DIR_STACK) );

  if ~exist('silent'); DIR_STACK, end;