Repetition - Mitsubishi MELFA CR1D Instruction Manual

Table of Contents

Advertisement

(2) Repetition

Multiple command statements can be repeatedly executed according to the designated conditions.
*Command word
Command word
For Next
While WEnd
*Statement example
Statement example
For M1=1 To 10 ................................................................
:
Next
For M1=0 To 10 Step 2 .....................................................
:
Next
While (M1 >= 1) And (M1 <= 10) ......................................
:
WEnd
*Related functions
Unconditional branching, branching...................................................
Interrupt..............................................................................................
Input signal wait .................................................................................
Repeat between For statement and Next statement until designated conditions are satisfied.
Repeat between While statement and WEnd statement while designated conditions are
satisfied.
Repeat between For statement and Next statement 10 times.
The initial numeric variable M1 value is 1, and is incremented by one with each
repetition.
Repeat between For statement and Next statement 6 times.
The initial numeric variable M1 value is 0, and is incremented by two with each
repetition.
Repeat between While statement and WEnd statement while the value of the numeric
variable M1 is 1 or more and less than 10.
Function
Explanation
Explanation
Explanation page
Page 104, "(1) Unconditional branching, conditional branching,
waiting"
Page 107, "(3) Interrupt"
Page 111, "(1) Input signals"
MELFA-BASIC V functions 4-106
4MELFA-BASIC V

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents