EasyManua.ls Logo

Mitsubishi MELFA CR1D - Page 258

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

Table of Contents

Related product manuals