KEP MMI-1500 Installation & Operation Manual page 202

Mmi-touchscreen series
Table of Contents

Advertisement

char Toggleflag
int a[13]
int b[14]
int c = 4848
char i = 0
b[0] = 13
While b[0]
a[i] = 20 + i * 10
If a[i] == 120 Then
c =200
Break
End If
i = i + 1
Wend
SetData(c ,4x_Bin ,2,1)
End Macro_Command
Nested While Loops
Macro_Command main( )
int a[250]
int b[250]
int i = 1
a[0] = 1
b[0] = 2
While a[0]
While b[0]
b[i ] = 10 + i * 10
If b[i] == 210 Then
SetData(i ,4x_Bin ,1,2)
b[i] = 200
Break
End If
i = i + 1
Wend
If b[i] == 200 Then
SetData(b[0] ,4x_Bin ,1,4)
Break
End If
SetData(b[0] ,4x_Bin ,1,3)
Wend
End Macro_Command
10: Break and Continue
(1)
Macro_Command main( )
int j, K[10]
For j = 0 To 10
If j % 2 == 0 Then
k[j] = 5
Else
Break
End If
Next
SetData(k[0],4x_Bin ,1,10)
End Macro_Command
(2)
Macro_Command main( )
int a[13]
int b[14]
int c = 4848
char i = 0
b[0] = 13
While b[0]
a[i] = 20 + i * 10
If a[i] == 120 Then
c =200
i = i + 1
Continue
End If
i = i + 1
If c == 200 Then
SetData(c ,4x_Bin ,2,1)
Break
End If
Wend
End Macro_Command
11: Infinite loop
The loop is created because b[0] is never set to zero.
Caution! Infinite loops slow down screen updates or lock
up the MMI. Do not attempt to run this code in simulation
mode.
Macro_Command main( )
int b[14]
char i = 0
b[0] = 13
While b[0]
i = i + 1
Wend
End Macro_Command
194

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mmi-750Mmi-730Mmi-850

Table of Contents