Private Sub Command1_Click()
Dim a As Integer
For i=1 To 30
a(i)=i
Next
For Each arrItem 【 】a
If arrItem Mod 7=0 Then Print arrItem;
If arritem>90 Then Exit For
Next
End Sub
请填空。
正确答案:InIn 解析:本题考查了For Each 匩ext语句,与For 匩ext类似。但For Each 匩ext 专门用于数组或对象"集合",其一般格式为:For Each 成员 In 数组循环体[Exit For]厖Next[成员]
Private Sub Command1_Click()
Dim a As Integer
For i=1 To 30
a(i)=i
Next
For Each arrItem 【 】a
If arrItem Mod 7=0 Then Print arrItem;
If arritem>90 Then Exit For
Next
End Sub
请填空。
正确答案:InIn 解析:本题考查了For Each 匩ext语句,与For 匩ext类似。但For Each 匩ext 专门用于数组或对象"集合",其一般格式为:For Each 成员 In 数组循环体[Exit For]厖Next[成员]