4-257
Detailed explanation of command words
4MELFA-BASIC IV
XClr (X Clear)
[Function]
This instruction cancels the program selection status of the specified task slot from within a program. It is
used during multitask operation.
[Format]
[Terminology]
<Slot No.>
Specify a slot number in the range from 1 to 32 as a constant or variable.
[Reference Program]
1 XRun 2,"1"
' Executes the first program in task slot 2.
:
10 XStp 2
' Pauses the program of task slot 2.
11 Wait M_Wai(2)=1
' Waits until the program of task slot 2 pauses.
12 XRst 2
' Cancels the pause status of the program of task slot 2.
:
20 XClr 2
' Cancels the program selection status of task slot 2.
21 End
[Explanation]
(1) An error occurs at execution if the specified slot does not select the program.
(2) If the designated program is being operating, an error will occur at execution.
(3) If the designated program is being pausing, an error will occur at execution.
(4) If this instruction is used within a constantly executed program, it becomes enabled by changing the
value of the "ALWENA" parameter from 0 to 7 and turning the controller's power off and on again.
[Related instructions]
,
,
[Related parameter]
ALWENA
XClr[]<Slot No.>