ID : 149
Suspend
Function
Suspend a designated task.
Syntax
Suspend 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 suspend of the specified task.) 1 (or ON), -1 (or True) Synchronous processing (Execute next processing after the specified task is suspended.)
Description
A task designated in task is suspended and put into the hold status.
Task status is not changed when any task in step stop status is designated.
The own task cannot be suspended by Suspend. An error occurs when the own task is designated. Use Hold to suspend the own program.
Related Terms
Kill, KillAll, SuspendAll, Halt, Hold, Task Status, Hold Status, SuspendByName
Attention
- The own task cannot be suspended. When it is designated, an error occurs. To suspend the own task, use Hold command.
- Panel screen task cannot be designated.
- If a specified task is not found, "81500029: Failed to find a file." is displayed.
Example
'!TITLE "Suspending Task"
' Suspend the other program(s) running in parallel
Sub Sample_Suspend
Dim aaa As Integer
' Start up another program in parallel
Run Suspend_Sample2
For aaa = 0 To 30
' Display 0-30 count-up as processing of invoker
PrintDbg "Call Sample_Suspend " & aaa
Next
' Suspend programs running in parallel
Suspend Suspend_Sample2
End Sub
ID : 149