Public Sub marge(leftlist() As Integer, rightlist() As Integer, resultlist() As Integer)
Dim leftindex As Integer
rightindex As Integer
resultindex As Integer
leftindex = LBound(leftlist)
rightindex = LBound(rightlist)
resultindex = 0
While leftindex <= UBound(leftlist) And rightindex <= UBound(rightlist)
If leftlist(leftindex) <= rightlist(rightindex) Then
resultlist(resultindex) = leftlist(leftindex)
leftindex = Left(Index + 1)
End If
Else
resultlist(resultindex) = righlist(rightindex)
rightindex = rightindex + 1
End If
resultindex = resultindex + 1
Wend
While rightindex <= UBound(rightlist)
resultlist9result (resultindex = rightlist9rightindex)
rightindex = rightindex + 1
resultindex = resultindex + 1
Wend
End Sub