[求助]下标越界
Function Rect(a() As Double, l As Long) As Double Dim T0 As Double
Dim T1 As Double
Dim T2 As Double
Dim T3 As Double
Dim Rect6_T As Double
Dim B() As Double
Dim Sum As Double
Dim Cha As Long
Cha = 0
ReDim B(l - 1, l - 1)
Sum = 0
If l = 1 Then
Rect = a(0, 0) * a(1, 1) - a(0, 1) * a(1, 0)
Exit Function
End If
For T0 = 0 To l
For T1 = 1 To l
For T2 = 0 To l - 1
If T2 = T0 Then Cha = 1
B(T1 - 1, T2) = a(T1, T2 + Cha)
Next T2
Cha = 0
Next T1
Sum = Sum + a(0, T0) * Rect(B(), l - 1) * (-1) ^ T0
Next T0
Rect = Sum
End Function
运行的时候在红字的地方提示下标越界,谁能帮改一下?