ID : 5283
SuspendByName
Function
Suspend a designated task. Unlike Suspend command, you can use a formula for task name.
Syntax
SuspendByName task name[, Synchronizing flag]
Guaranteed Entry
- Task name
- Specify a task name by String Type data. Refer to "How to Designate a Task Name."
- 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
At the time of program execution, evaluate a formula designated as a task name and create the task name dynamically to suspend. This is useful to Suspend sequential named tasks at a time.
Except format, other behaviors are the same as Suspend.
Related Terms
Suspend, others are the same as Suspend.
Attention
- Refer to Suspend.
- If a specified task is not found, "81500029: Failed to find a file." is displayed.
Example
In the following example, suspend the 9 (Pro2 to Pro10) tasks.
'!TITLE "Suspend a Task Using a Formula"
'Pro1.pcs
Sub Main
TakeArm Keep = 0
Dim n As Integer
'Create task name Pro2 to Pro10 using a formula and suspend them
For n = 2 To 10
SuspendByName "Pro" & n
Next
End Sub
ID : 5283