自己写的进程,为什么无效?请问

自己写的进程,为什么无效?请教
procedure     TForm1.Button1Click(Sender:     TObject);    
var    
Buf:Array     of     byte;    
i:integer;    
begin    
  Setlength(Buf,11);    
  Buf[2]:=1;               //数组第三字节赋为1    
  New(Buf);                 //调用New进程,修改第三字节    
  Showmessage(intToStr(Buf[2]));    
end;    
 
Procedure     TForm1.New(RecData:Array     of     BYTE);    
begin    
  Recdata[2]:=100;                                
end;    
 
为什么最后Showmessage出来的还是1,而不是进程修改掉的100     ?

------解决方案--------------------
这个问题是由于Delphi编译器本身的处理造成的
查Delphi的帮助Open array parameters的说明
When you pass an array as an open array value parameter, the compiler creates a local copy of the array within the routine 's stack frame.

就是说Delphi编译的TForm1.New方法执行前 会把从传进来动态数组(一个堆指针)拷贝到栈上再进行操作,所以要修改数组参数的内容 应该这样写:
Procedure TForm1.New(var RecData:Array of BYTE);