11.14 exit()

This function can be used for a controlled exiting of all dialogs. All running dialogs are terminated, their on dialog finish rules are called. Afterward, the IDM event loop is quit. The dialogs, however, are not deleted.

Definition

void exit
(
  { boolean StopDialog := true input }
)

Parameters

boolean StopDialog := true input
If this parameter is set to true (default), the behaviour described above occurs. If false is passed, however, the event loop is terminated without the dialog being closed, which also means that the finish rule of the dialog is not executed.

Example

on END_Button select
{
  exit();
}

Important

A rule is not exited immediately with the exit() function, but is processed to the end. If the rule is to be exited immediately, a return has to be given after the exit() call.

on END_Button select
{
  exit();
  print "Still running";
}
 
on END_Button select
{
  exit();
  return;
  print "Not running anymore";
}

See also

Built-in function stop()

Chapter “Return of Values”