Mitsubishi MELFA CR1D Instruction Manual page 258

Table of Contents

Advertisement

4MELFA-BASIC IV
Select Case (Select Case)
[Function]
Executes one of multiple statement blocks according to the condition expression value.
[Format]
Select[] <Condition>
Case[]<Expression>
[<Process>]
Bresk
Case[]<Expression>
[<Process>]
Break
:
Default
[<Process>]
Break
End[]Select
[Terminology]
<Condition>
<Expression>
<Process>
[Reference Program]
1 Select MCNT
2 M1=10
3 Case Is <= 10
4 Mov P1
5 Break
6 Case 11
6 Case 12
7 Mov P2
8 Break
9 Case 13 TO 18
10 Mov P4
11 Break
12 Default
13 M_Out(10)=1
14 Break
15 End Select
4-245 Detailed explanation of command words
Describe a numeric operation expression.
Describe an expression using the following format. The type must be the same as the
condition expression.
*IS <Comparison operator> <Constant>
*<Constant>
*<Constant> TO <Constant>
Writes any instruction (other than the GoTo instruction) provided by MELFA-BASIC V.
' This line is not executed
' MCNT <= 10
'MCNT=11 OR MCNT=12
'13 <= MCNT <= 18
' Other than the above.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents