What have I done wrong?
for starters: not having your posted code between code tags...
see how it reads differently when you use code tags:
procedure TUserForm.CopyArray(InArray : TByteArray ; var OutArray : TByteArray);
var
I : integer;
begin
for I := 0 to 49 do
OutArray[I] := InArray[I];
end;
Secondly, you should be posting code in such fashion that it is able to compile. (at the least you should be showing
all relevant declarations and subroutines).
That you think you've done it right doesn't exactly guarantee that you actually have done so. Unfortunately we can't see that.
So where is your actual declaration of TByteArray and how do you call this TUserForm.CopyArray() procedure ?