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

“参数不可选”?

Public Function CalcPoint(ByVal ZMatr As Integer, _<BR>ByRef minedBlock() As Integer) As AcadDictionary<BR>                       Dim XMatr, YMatr As Integer<BR>                       Dim ptDict As AcadDictionary<BR>                       XMatr = UBound(minedBlock) - 1<BR>                                .......


                       .......


                       Set CalcPoint = ptDict<BR>End Function<BR><BR>Public Sub DrawOpenPit()<BR>                       Dim XMatr, YMatr, ZMatr<BR>                       Dim ptOpenPit As AcadDictionary


                       Dim minedBlock(47, 29, 25) As Integer                        <BR>               .......<BR>                       ptOpenPit = CalcPoint(0, minedBlock(47, 29, 25))


               .........


End Sub


为什么我一编译的时候,就说 “参数不可选”?

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

回复

Public Function CalcPoint(ByVal ZMatr As Integer, _<BR>ByRef a As Variant) As AcadDictionary<BR>                       Dim XMatr, YMatr As Integer<BR>                       Dim ptDict As AcadDictionary<BR>                       XMatr = UBound(a) - 1


                       Set CalcPoint = ptDict<BR>End Function


Public Sub DrawOpenPit()<BR>                       Dim XMatr, YMatr, ZMatr<BR>                       Dim ptOpenPit As AcadDictionary


                       Dim minedBlock(0 To 2) As Integer<BR>                       minedBlock(0) = 47: minedBlock(1) = 29: minedBlock(2) = 25<BR>                       Dim b As Variant<BR>                       b = minedBlock


                       Set ptOpenPit = CalcPoint(0, b)


<BR>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, _<BR>ByRef minedBlock() As Integer) As AcadDictionary<BR>-》
Public function CalcPoint(ByVal ZMatr As Integer, _<BR>ByRef minedBlock) As AcadDictionary<BR>
页: [1]
查看完整版本: “参数不可选”?