|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Apr 2005
Posts: 238
|
Quick VB6 Programming
I am trying to add two byte arrays together... I don't work with byte arrays too often so this is new to me. Would the following code work?
Code:
Function AddByteArrays(arr1() As Byte, arr2() As Byte) As Byte()
Dim tmpByte() As Byte
ReDim tmpByte(0)
Dim I As Integer
For I = 0 To UBound(arr1)
tmpByte(I) = arr1(I)
ReDim Preserve tmpByte(I + 1) As Byte
Next
I = I + 1
For a = 0 To UBound(arr2)
tmpByte(I) = arr2(a)
ReDim Preserve tmpByte(I + 1) As Byte
I = I + 1
Next
ReDim Preserve tmpByte(UBound(tmpByte) - 1)
AddByteArrays = tmpByte
End Function
|
|
|
|