[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic execution of user functions when exit octave
From: |
Keith Goodman |
Subject: |
Re: automatic execution of user functions when exit octave |
Date: |
Fri, 26 May 2006 08:50:13 -0700 |
On 5/26/06, Stefan Mahr <address@hidden> wrote:
is it possible to "plug in" a user function to the exit routine?
Put atexit("myfunc") in your ~/.octaverc file. Or in the system-wide octaverc.
help atexit
atexit is a built-in function
-- Built-in Function: atexit (FCN)
Register a function to be called when Octave exits. For example,
function print_fortune ()
printf ("\n%s\n", system ("fortune"));
fflush (stdout);
endfunction
atexit ("print_fortune");
will print a message when Octave exits.