Mitsubishi MELFA CR1D Instruction Manual page 207

Table of Contents

Advertisement

End (End)
[Function]
This instruction defines the final step of a program.
It is also used to indicate the end of a program explicitly, by entering the End instruction at the end of the
main processing, in case a sub program is attached after the main program. In the case of a sub program
called up by the CallP instruction, the control is returned to the main program when the End instruction is
executed.
[Format]
End
[Reference Program]
1 Mov P1
2 GoSub *ABC
3 End
:
10 *ABC
11 M1=1
12 Return
[Explanation]
(1) This instruction defines the final step of a program. Use the Hlt instruction to stop a program in the mid-
dle and put it in the pause status.
(2) If executed from the operation panel, a program is executed in the continuos operation mode; it will be
executed again from the top even if it contains an End instruction. If it is desired to end a program at the
End instruction, press the End key on the operation panel to stop the cycle.
(3) It is allowed to have several End statements within one program.
(4) The End statement does not need to be described at the end of the program.
(5) If the End command is executed by the sub program called by CallP, control will return to the main pro-
gram. The operation will be similar to the RETURN command of GoSub.
(6) The file and communication line which are opened are all closed by execution of the End command.
(7) At program End, the Spd, Accel, Oadl, JOvrd, Ovrd, Fine and Cnt settings will be initialized.
[Related instructions]
Hlt (Halt), CallP (Call P)
' End the program.
Detailed explanation of command words 4-194
4MELFA-BASIC IV

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents