请教一个数组参数问题!
Private Function chenfei(cf() As Single, n As Integer) As SingleDim i As Integer
Dim aver As Single, sum As Single
ReDim cf(n)
For i = 1 To n - 1
sum = sum + cf(i)
Next
aver = sum / n
chenfei = aver
End Function
请问这个函数调用是问什么显示:数组被锁定.这是书上的例子,把ReDim cf(n) 去了后就可以了,本人也看不出ReDim cf(n) 有什么用处.