Denso RC5 Specifications Page 272

  • Download
  • Add to my manuals
  • Print
  • Page
    / 692
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 271
11-22
ON-GOTO (Statement) [Conforms to SLIM]
Function
Executes an unconditional branch due to the value of an expression.
Format
ON <Expression> GOTO <Label name> [,<Label name>]
Explanation
This statement jumps to the line number written at the same level as the value
of <Expression> and continues the execution of the program there. The order
of this is counted as 1, 2, … from the left.
The system rounds down the value of <Expression> to an integer and
processes it.
Note: If the result of the expression exceeds the order, nothing is
executed.
Related Terms
ON-GOSUB
Example
REM Executes a plural condition decision.
SELECT CASE Index
'The command is executed when the index value matches the CASE
'statement value.
CASE 0 'When the index is 0.
STOP 'Ends the program.
CASE 1 'When the index is 1.
HALT “STOP” 'Suspends the execution of the program.
CASE 2 'When the index is 2.
HOLD “STOP” 'Suspends the execution of the program.
CASE 3 'When the index is 3.
STOPEND
'Stops a continuous program or stops the program after a cycle.
CASE 4 'When the index is 4.
ON li1 + li2 GOSUB *samp1, *samp2, *samp3
'Calls the subroutine of the label name written at the same
'level as the value of li1 + li2.
CASE 5 'When the index is 5.
ON li1 + li2 GOTO *samp1, *samp2, *samp3
'Jumps to the label written at the same level as the value
'of li1 + li2.
CASE 6 'When the index is 6.
END 'Declares the end of motion by the program.
END SELECT
'Declares the end of a plural condition decision statement.
Page view 271
1 2 ... 267 268 269 270 271 272 273 274 275 276 277 ... 691 692

Comments to this Manuals

No comments