terminate Instruction

The terminate instruction terminates all active methods.

Syntax

The syntax of the terminate instruction is:

terminate;

Description

The terminate instruction cuts back the execution stack and then returns the following result to the controlling application.

APPLICATION_TERMINATED (1209)

If the application is a standard JADE application controlled by the jade.exe JADE application program, an orderly shutdown of the application is invoked.

Example

The following example shows the use of the terminate instruction in a method on a form that is used to shut down the application.

shutDownApp();
vars
    mainWindow : Form;
begin
    mainWindow := getMdiFrame;
    if mainWindow <> null then
        // We have an MDI frame.  By unloading it, the app is shut down
        mainWindow.unloadForm;
    else
        // We don't have an MDI frame, so use terminate to shut down
        terminate;
    endif;
end;