早教吧 育儿知识 作业答案 考试题库 百科 知识分享

谁能帮我写一个VB的过程是把数组Point中的元素每隔25个放到数组result中数组类型是POINTAPI就是把数组Point里的一个一个值,每隔25个挑出来,放到另一个数组里PublicSubReduceArray(ByRefPoi

题目详情
谁能帮我写一个VB的过程是把数组 Point 中的元素每隔25个 放到数组 result 中 数组类型是 POINTAPI 就是把数组Point里的一个一个值,每隔25个挑出来,放到另一个数组里 Public Sub ReduceArray(ByRef Point() As POINTAPI,ByRef result() As POINTAPI) Dim result() As POINTAPI ReDim result(0) Dim Bound As Long Dim bound_r As Long Bound = UBound(Point) Dim i As Long Dim temp_x, temp_y As Integer For i = 0 To Bound Step 25 Point(i).X = temp_x Point(i).Y = temp_y bound_r = UBound(result) result(bound_r).X = temp_x result(bound_r).Y = temp_y ReDim Preserve result(bound_r + 1) Next i Debug.Print UBound(result) ReDim result_point(UBound(result)) Dim count As Integer For count = LBound(result) To UBound(result) result_point(count).X = result(count).X result_point(count).Y = result(count).Y Next count
▼优质解答
答案和解析
看你的程序,你的问题应该难不倒你吧?隔25个用循环没问题吧!