VB 函数 do while ...Loop 与 while .wend 的区别

问题描述:

VB 函数 do while ...Loop 与 while .wend 的区别
Dim D As Variant
Dim E() As Integer
Do While A1 0
A1 = 0
For i2 = 0 To UBound(D)
If D(i2) > A1 Then
A1 = D(i2)
End If 'D(i2) > A1
Next 'i2 = 0
ReDim Preserve E(i3) As Integer
E(i3) = A1
i3 = i3 + 1
For i2 = 0 To UBound(D)
If D(i2) = A1 Then
D(i2) = 0
End If 'D(i2) > A1
Next 'i2 = 0
Loop
'这是一个排序用的,把数组元素(D)大到小排序去重复的复制到另一个(E).
'问,为什么do while ...Loop 与 while .wend 的输出没有区别?
1个回答 分类:综合 2014-09-18

问题解答:

我来补答
do while ...loop和while ...wend没区别,完全一样,先判断条件再运行循环体.
do ...loop while就不一样了,先运行再判断
 
 
展开全文阅读
剩余:2000
上一页:课时练P3