contents   index   previous   next



Clib.atexit()

syntax:

Clib.atexit(function)

where:

function - a function to be called when a script is exited. Use the actual function name or ID and not a string.

 

return:

void.

 

description:

This method registers a function to be called when the script ends. The variable string passed to this function is the name of a function to be called.

 

see:

Clib.exit()

 

example:

Screen.writeln("Starting the script");

 

Clib.atexit(Finished);

/*

   Not:

   Clib.atexit("Finished");

*/

 

function Finished()

{

   Screen.writeln("Exiting the script");

} // Finished

 


Clib.exit()