Next: , Previous: Invoking Octave from the Command Line, Up: Getting Started


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. The default value is zero.

— Built-in Function: atexit (fcn)

Register a function to be called when Octave exits. For example,

          function bye_bye ()
            disp ("Bye bye");
          endfunction
          atexit ("bye_bye");
     

will print the message "Bye bye" when Octave exits.