szwbluesky 发表于 2004-12-26 04:58:00

“参数不可选”?

Public Function CalcPoint(ByVal ZMatr As Integer, _
ByRef minedBlock() As Integer) As AcadDictionary
                       Dim XMatr, YMatr As Integer
                       Dim ptDict As AcadDictionary
                       XMatr = UBound(minedBlock) - 1
                                .......
                       .......
                       Set CalcPoint = ptDict
End Function
Public Sub DrawOpenPit()
                       Dim XMatr, YMatr, ZMatr
                       Dim ptOpenPit As AcadDictionary
                       Dim minedBlock(47, 29, 25) As Integer                       
               .......
                       ptOpenPit = CalcPoint(0, minedBlock(47, 29, 25))
               .........
End Sub
为什么我一编译的时候,就说 “参数不可选”?

王咣生 发表于 2004-12-26 09:52:00

Public Function CalcPoint(ByVal ZMatr As Integer, _
ByRef a As Variant) As AcadDictionary
                       Dim XMatr, YMatr As Integer
                       Dim ptDict As AcadDictionary
                       XMatr = UBound(a) - 1
                       Set CalcPoint = ptDict
End Function
Public Sub DrawOpenPit()
                       Dim XMatr, YMatr, ZMatr
                       Dim ptOpenPit As AcadDictionary
                       Dim minedBlock(0 To 2) As Integer
                       minedBlock(0) = 47: minedBlock(1) = 29: minedBlock(2) = 25
                       Dim b As Variant
                       b = minedBlock
                       Set ptOpenPit = CalcPoint(0, b)
End Sub

雪山飞狐_lzh 发表于 2004-12-26 19:25:00

ptOpenPit = CalcPoint(0, minedBlock(47, 29, 25) -》
ptOpenPit = CalcPoint(0, minedBlock)
Public function CalcPoint(ByVal ZMatr As Integer, _
ByRef minedBlock() As Integer) As AcadDictionary
-》
Public function CalcPoint(ByVal ZMatr As Integer, _
ByRef minedBlock) As AcadDictionary
页: [1]
查看完整版本: “参数不可选”?