EasyManuals Logo

Mitsubishi MELFA CR1D User Manual

Mitsubishi MELFA CR1D
458 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #216 background imageLoading...
Page #216 background image
4-203 Detailed explanation of command words
4MELFA-BASIC IV
GoSub (Return)(Go Subroutine)
[Function]
Calls up the subroutine at the designated step label. Be sure to return from the jump destination using the
Return instruction.
[Format]
[Terminology]
<Call Destination> Describe the step label name.
[Reference Program]
1 GoSub *LBL
2 End
:
20 *LBL
21 Mov P1
22 Return ' Be sure to use the Return instruction to return.
[Explanation]
(1) Make sure to return from the subroutine by using the Return command. If return by GoTo command, the
memory for control structure (stack memory) will decrease, and it will cause the error at continuous exe-
cuting.
(2) The call of other subroutines is possible again by the GoSub command out of the subroutine. This
approach can be employed approximately up to 800 times.
(3) When the step or label of the call place does not exist, it becomes the execution-time error.
[Related instructions]
Return (Return)
GoSub[]<Call Destination>

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELFA CR1D and is the answer not in the manual?

Mitsubishi MELFA CR1D Specifications

General IconGeneral
BrandMitsubishi
ModelMELFA CR1D
CategoryController
LanguageEnglish

Related product manuals