Arbortext Command Language > Callbacks > session_add_callback > quit
  
quit
Function prototype:
function funcname (code, system)
This quit callback is passed the argument code, which indicates how the application is being exited.
Arguments
funcname is the name for the user-defined function called to be invoked whenever the editing session is terminated. This is invoked before any of the built-in save checking is done. If the quit callback returns a value of -1, no further callbacks will be called and the quit will be canceled. All other returned values are ignored. If the callback is already on the callback list for the session, the list is shuffled to place the callback into the desired position. The callback is not added to the list a second time.
code is one of the following values:
0 — prompt about any unsaved changes, that is, quit
1 — save all modified documents without prompting, that is, exit
2 — do not prompt about unsaved changes and quit without saving modified documents, that is, quit ok
system is one of the following values:
0 — indicates a normal application exit.
1 — indicates an application exit due to a system shutdown (due to a log off, restart, and so forth).
Related Topics
session_remove_callback function
exit command
quit command