Doing a SetLength on an array passed into a proc by reference
- by csharpdefector
Hi All,
Sure, even I can do this...
var
testarray : array of string;
setlength(testarray, 5);
but if I want to get clever and have a procedure into which I pass the array by referance like this I cant do it!
procedure DoStuffWithArray(var passedarray : array of string);
begin
setlength(passedarray, 5);
end;
compiler says 'incompatible…