Pref::callOnExit -- defines
an exit handler
IntroductionPref::callOnExit(f) defines a function
f which is called on exit of MuPAD.
Call(s)Pref::callOnExit(f)
Pref::callOnExit(list)
Pref::callOnExit(NIL)
Pref::callOnExit()
Parametersf |
- | a function |
list |
- | a list of functions |
ReturnsPref::callOnExit returns the previously defined
function, list of functions, or NIL.
Related
Functions
DetailsPref::callOnExit(f) defines a function
f which is called on exit of MuPAD.Pref::callOnExit(list) defines a list of
functions which are executed in the order of their occurence in
list on exit of MuPAD.Pref::callOnExit(NIL) sets the default
value, which is NIL.Pref::callOnExit() returns the current
value.
Example
1This example shows how to print some text on exit of MuPAD. It only works in the UNIX terminal versions of MuPAD:
>> Pref::callOnExit(
()->print(Unquoted, "Good by, thank You for using MuPAD.")
):
quit
Good by, thank You for using MuPAD.
In the frontends on all platforms the output is the following since
BackgroundPref::callOnExit can be used to send communication
modules a disconnect message or to remove temporary user-defined files
when leaving MuPAD.