www.delorie.com/gnu/docs/octave/octave_28.html   search  
 
Buy GNU books!


GNU Octave

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Quitting Octave

Built-in Function: exit (status)
Built-in Function: quit (status)
Exit the current Octave session. If the optional integer value status is supplied, pass that value to the operating system as the Octave's exit status.

Built-in Function: atexit (fcn)
Register function to be called when Octave exits. For example,

 
function print_flops_at_exit ()
  printf ("\n%s\n", system ("fortune"));
  fflush (stdout);
endfunction
atexit ("print_flops_at_exit");

will print a message when Octave exits.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003