193
int w, i[10]
char x
For w = 0 To 9
i[w] = 0
Next
GetData(i[0] ,4x_Bin ,1,4)
w = i[0] + i[1] + i[2] + i[3]
If w > 150 Then
For w = 0 To 3
i[w] = 0
Next
SetData(i[0] ,4x_Bin ,1,4)
x = 0
SetData(x ,1x_Bin ,3,1)
GetData(i[0] ,4x_Bin ,212,2)
x = 0
SetData(x ,0x_Bin ,4,1)
Else
For w = 0 To 3
i[w] = i[w] + 2*w
Next
SetData(i[0] ,4x_Bin ,1,4)
End If
End Macro_Command
6: If-Then-Else
Macro_Command main( )
int j, k[10]
For j = 0 To 10
k[j] = j
Next
If k[0] == 0 Then
SetData(k[4],4x_Bin ,1,1)
End If
If k[0] == 0 Then
SetData(k[4],4x_Bin ,1,1)
Else
SetData(k[5],4x_Bin ,1,1)
End If
If k[1] == 0 Then
SetData(k[3],4x_Bin ,2,1)
Else If k[1] == 1 Then
SetData(k[1],4x_Bin ,3,1)
End If
If k[1] == 0 Then
SetData(20,4x_Bin ,4,1)
Else If k[1] == 2 Then
SetData(k[1],4x_Bin ,5,1)
Else
SetData(k[2],4x_Bin ,6,1)
End If
End Macro_Command
7: Select-Case
Macro_Command main( )
int j, k[10]
For j = 0 To 10
k[j] = j
Next
Select Case k[1]
Case 1
j = 1
Break
Case 2
j = 2
Break
End Select
SetData(j,4x_Bin ,1,1)
End Macro_Command
Macro_Command main( )
int k[10]
int j
j = 90 * 1
k[4] = 8
Select Case k[4]
Case 1
j = 1
Break
Case 3
j = 2
End Select
SetData(j,4x_Bin ,1,1)
End Macro_Command
8: Array
Macro_Command main( )
int a[25]
int b[1]
int i
b[0] = 13
For i = 0 To b[0] Step 1
a[i] = 20 + i * 10
Next
SetData(a[0] ,4x_Bin ,1,13)
End Macro_Command
9: While-Wend
Macro_Command main( )
Summary of Contents for MMI-1500
Page 2: ...ii...