帮我看看这个程序的主要作用是什么?
Private Sub Command1_Click()
Dim i%, a%(100), left%(), mid, right%()
i = 100
Randomize
For i = 0 To UBound(a)
a(i) = Int(Rnd * 1000)
Next
Call s1(a, left, mid, right)
End Sub
Public Sub s1(a%(), left%(), mid, right%())
Dim i%, l%, r%
l = 0
r = 0
mid = a(0)
For i = 1 To UBound(a)
If (a(i) <= mid) Then
ReDim Preserve left(l)
left(l) = a(i)
l = l + 1
Else
ReDim Preserve right(r)
right(r) = a(i)
r = r + 1
End If
Next
End Sub
帮我看看这个程序的主要作用是什么!
谢谢!