So I am trying to split an array into two halves and am having allot more trouble than I anticipated. Setting break points, I know that as these lines are being executed "sz"(Integer) is set to 9. This code sets "rightSz"(Integer) to be 4, which is what I expected, but it also sets "leftSz"(Integer) to be equal to 6. I have no idea why it is giving me this and it is causing a lot of problems in later sections of my code.
If sz Mod 2 = 1 Then
rightSz = sz / 2
leftSz = rightSz + 1
Else
leftSz = sz / 2
rightSz = sz / 2
End If