<< Prev        Next >>

ID : 145

Kill

Function

Kill a designated task.

Syntax

Kill task[, Synchronizing flag]

Guaranteed Entry

Task
Specify a task. Refer to "How to Designate Task."
Synchronizing flag
Specify whether the processing is executed synchronously by integer type data. Specify 0, 1, -1 as shown table below. This is omittable. This should be "0" if it is omitted.
flag Description
0, OFF, or False Asynchronous processing (Execute next process without waiting the end of the specified task.)
1 (or ON), -1 (or True) Synchronous processing (Execute next processing after the specified task ends)

Description

A task designated in task is killed and put into the stop status.

Tasks in hold status or step stop status are also put into the stop status.

Attention

  • The own task cannot be killed. When it is designated, an error occurs. To kill the own task, use Halt.
  • If the designated task is already in stop status, nothing occurs.
  • After Kill is executed, it may take some time until the task stops. To perform Run right after Kill, be sure to ensure that the task is stopped in advance.
  • Panel screen task cannot be designated.
  • If a specified task is not found, "81500029: Failed to find a file." is displayed.

Example

'!TITLE "Killing Task"
' Kill the other program(s) running in parallel
Sub Sample_Kill

  Dim aaa As Integer

  ' Start up another program in parallel
  Run Kill_Sample2

  For aaa = 0 To 50

    ' Display 0-50 count-up as processing of invoker
    PrintDbg "Call Sample_Kill " & aaa

  Next

  ' Kill programs running in parallel
  Kill Kill_Sample2

End Sub

ID : 145

<< Prev        Next >>