VB编程问题
有如下程序:Option Base 1
Private Function FindMin(a() As Integer)
Dim Start As Integer
Dim Finish As Integer, i As Integer
Start = LBound(a)
Finish = UBound(a)
Min = a(Start)
For i = Start To Finish
If a(i) < Min Then Min = a(i)
Next i
FindMin = Min
End Function
Private Sub Command1_Click()
Dim arr1
Dim arr2(4) As Integer
arr1 = Array(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), Val(Text4.Text))
For i = 1 To 4
arr2(i) = CInt(arr1(i))
Next i
M = FindMin(arr2)
Print "最小值是: "; M
End Sub
问题:FindMin过程是一个数组,为什么在调用时用的是“M = FindMin(arr2)”而不是“M = FindMin(arr2(i))”呢?
追问:恩?什么是递归呀?