ExitTask Statement

Exit the current Task.

Syntax

ExitTask

Comments

The statement is used to exit the current Task. Any OnTaskEnd event procedures will be called for the current task and the OnTestEnd events will also be called for the current test if one is running. ExitTask statement could be used in a procedure called from a task to end the current task. To Skip OnEndXXX events you can use the Task statement with -1 as a task number (i.e. Task -1).

A run-time error is generated if no task is currently running, for example, performing Debug Doit on statements in a test when no program was running.

Example

If iRunMode<>RUN_ALL_TESTS

ExitTask ! skip all tests in this task

Endif

See Also

Goto, Task, Test