User Tools

Site Tools


shutdown_arm_termination_procedure_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== SHUTDOWN (arm termination procedure) ====== Previous pageReturn to chapter overviewNext page

SHUTDOWN([procedure])

blk2blue.jpg

SHUTDOWN Arms a procedure which is called when the program terminates.
procedure The label of a PROCEDURE. If omitted, the SHUTDOWN process is disarmed.

The SHUTDOWN statement arms a procedure which is called when the program terminates. The shutdown procedure is called by normal program termination or by an abnormal-end/run-time halt. It may not be able to execute for an abnormal-end/run-time halt, depending upon the state of the system resources at the time of the crash. It is not called if the computer is rebooted or the program is terminated due to power failure. The same effect as SHUTDOWN can be more safely achieved by simply calling a procedure to execute on EVENT:CloseDown for the application frame.

Example:

SHUTDOWN(CloseSys)        !Arm CloseSys as the shutdown procedure

See Also:

HALT

RETURN

shutdown_arm_termination_procedure_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1